CoCart Core helps power many headless stores across the internet, and with your help making it even more awesome will be greatly appreciated. 😃
There are many ways to contribute to the project!
- Translating strings into your language.
- Answering questions in the CoCart community Discord server.
- Testing open issues or pull requests and sharing your findings in a comment.
- Testing CoCart beta versions and release candidates. Those are announced in the CoCart development blog.
- Submitting fixes, improvements, and enhancements.
If you wish to contribute code, please read the information in the sections below. Then fork the correct module for CoCart, commit your changes, and submit a pull request 🎉
Use the good first issue
label to mark your issue as new contributor.
CoCart Core is licensed under the GPLv3+, and all contributions to the project will be released under the same license. You maintain copyright over any contribution you make, and by submitting a pull request, you are agreeing to release that contribution under the GPLv3+ license.
If you have questions about the process to contribute code or want to discuss details of your contribution, you can ask in the #support channel in the CoCart community Discord server.
- Ensure you stick to the WordPress Coding Standards
- Ensure you use LF line endings in your code editor. Use EditorConfig if your editor supports it so that indentation, line endings and other settings are auto configured.
- When committing, reference your issue number (#1234) and include a note about the fix.
- Ensure that your code supports the minimum supported versions of PHP and WordPress; this is shown at the top of the
readme.txt
file. - Push the changes to your fork and submit a pull request on the development branch of the CoCart repository you forked.
- Make sure to write good and detailed commit messages (see this post for more on this) and follow all the applicable sections of the pull request template.
- Please avoid modifying the changelog directly or updating the .pot files. These will be updated by the CoCart team.
It is recommended to translate CoCart via the project on translate.cocartapi.com. You can join and help by translating there.
If CoCart is already 100% translated for your language, join anyway! The language files are regularly updated with new strings that need translation and will likely be added soon.
- Use
cart-rest-api-for-woocommerce
textdomain in all strings. - When using dynamic strings in printf/sprintf, if you are replacing > 1 string use numbered args. e.g.
Test %s string %s.
would beTest %1$s string %2$s.
- Use sentence case. e.g.
Some Thing
should beSome thing
. - Avoid HTML. If needed, insert the HTML using sprintf.
For more information, see WP core document i18n for WordPress Developers.