Thank you for contributing to our project! Here are some guidelines to help streamline the process and ensure that your contributions are effective.
- php: See the
composer.jsonfile to know the required php version - node: See the
package.jsonfile to know the required node version - pre-commit: Git hooks tool, see the install docs
For a better development experience you should set the WP_ENVIRONMENT_TYPE constant to local or development, one thing this do is prevent browser asset caching.
The docker environment counts with:
- npm
- composer
- xdebug
- latest wordpress and wp-cli
- supervisor to copy logs and auto build assets on change
- adminer to access the database
The .env file counts with:
- APP_PORT: port to access app
- ADMINER_PORT: port to access adminer
- DB_USER: database user used by app
- DB_PASSWORD: database password used by app
- DB_NAME: database name used by app
- DB_PORT: port to access database
- ADMIN_USER: admin user name to access app
- ADMIN_PASSWORD: admin user password to access app
- ADMIN_EMAIL: admin user email
- WORDPRESS_DEBUG: value used to set WP_DEBUG constant
- WORDPRESS_CONFIG_EXTRA: extra wordpress config that will be placed on wp-config.php
- XDEBUG_MODE: valid xdebug mode https://xdebug.org/docs/all_settings#mode
make install: Setup the docker environment, setup wordpress, install npm and composer dependencies, install woocommerce and generate store products.make build: Creates the plugin zipmake watch: Alias tonpm run watch:releasemake release: Setup the releasemake update-po: Update.potand.pofiles using the docker environment, see https://developer.wordpress.org/plugins/internationalization/localizationmake make-mo: Update.mofiles using the docker environment, see https://developer.wordpress.org/plugins/internationalization/localizationmake switch-language lang={locale_code}: Change wordpress language on docker environment
See Makefile for more make commands info.
npm run pot: For i18n WordPress uses pot files, this command generate our pot file from the tranlation filesnpm run watch:build: Runnpm run buildon asset changenpm run watch:release: Runmake buildon any changenpm run watch:logs: Copy php, wordpress and woocommerce logs tologsfolder on changenpm run watch:make-mo: Run wp-climake-mocommand on.pofiles changenpm run build: Build assetsnpm run build:{command}: Asset related commands
See package.json for more npm commands info.
composer run phpcs: Run PHP_CodeSniffercomposer run phpcbf: Apply PHP_CodeSniffer fixescomposer run metricsandcomposer run metrics:path: Run PhpMetricscomposer run qit:{command}: A series of qit commandscomposer run phpunit: Run the unit tests
See composer.json for more composer commands info.
When adding a new command, add its description here please.
We follow the Gitflow workflow for managing our branches. Please familiarize yourself with the Gitflow model if you are not already familiar. Here's a brief overview:
master: Represents the production-ready code.develop: Represents the latest development code.feature/*: Used for developing new features.bugfix/*: Used for fixing bugs.release/*: Used for preparing releases.hotfix/*: Used for fixing critical issues in the production code.
We encourage the use of Conventional Commits in your commit messages. This helps in generating meaningful changelogs and tracking project history effectively. If you're using VSCode, we recommend installing the Conventional Commits for VSCode extension for better integration.
When submitting a pull request, please ensure the following:
- Your commit message provides a clear and concise description of the changes made.
- Include a changelog in the following files:
readme.txt,changelog.txt, andchangelog.md. The changelog should summarize the changes made in this pull request. - If applicable, ensure that any changes related to Mercado Pago, WooCommerce, or WordPress are accompanied by relevant documentation updates.
- Changelog entries should be clear and objective, providing a brief summary of the changes made.
- It's important to include only relevant changes in the changelog.
- Ensure consistency in formatting and language across different changelog files.
We appreciate your contributions and adherence to these guidelines. They help maintain the quality and consistency of our project. Happy coding!
After adding the new texts in the code:
- Run
make update-poto update the.potand.pofiles with the new texts. - Edit the
.potfiles adding the translations. - Run
make make-moto update the.mofiles.