- Make sure you have
git
,node
,npm
installed.. - Clone this repository locally within the plugins directory of WordPress.
- Run
nvm use
from the root directory of the repository to install the correct version of Node JS. - Run
npm install
from the root directory of the repository to install dependencies. - Execute
npm run build
from the root directory of the repository. - Now go to the local installation, and activate this plugin.
- Signup for a Square sandbox account and input your App ID and Access Token
- From the dropdown box for location, choose a location(The default value is Default Test Account).
- Save.
- The Square Merchant Account's country should match the WooCommerce store's country and currency for this to work.
- Now, you can create items on Square and push them to WooCommerce or ViceVersa.
- Enable Square as a payment gateway from the Woocommerce->Settings->Payments page.
- Now, you can use the test cards here for testing Square credit card payments.
The documentation for the API endpoints can be found here
You can also explore the Square API from here
- The
/woocommerce/woocommerce-square/
repository is treated as a development repository: this includes development assets, like unit tests and configuration files. Commit history for this repository includes all commits for all changes to the code base, not just for new versions.
A "deployment" in our sense means:
- validating the version in the header and
WC_Square::$version
variable match - generating a
.pot
file for all translatable strings in the development repository - building all assets running
npm run build
- tagging a new version
- the changes will be pushed to a branch with the name
release/{version}
so that a PR can be issued on/woocommerce/woocommerce-square/
- cloning a copy of the latest release found on the
/woocommerce/woocommerce-square/
repo into a temporary directory - removing all development related assets, like this file, unit tests and configuration files
- exporting a copy of all these files into the
/trunk
and/tags/{version}
directories on the WC Square WP.org svn repo
woocommerce/woocommerce-square/trunk
includes all code for the current version and any new pull requests merged that will be released with the next version. It can be considered stable for staging and development sites but not for production.
This project is moving towards WooCommerce coding standards, though currently, it is not strictly enforced. Please respect these standards and if possible run appropriate IDE/editor plugins to help you enforce these rules.
We are striving to subject this extension to tests at various levels. They are works in progress. The following will be updated as there is progress. Do check with us if you want to contribute in some way towards these. TBD - Travis Integration TBD - Unit Testing TBD - E2E Testing
This extension is compatible with:
Contribution can be done in many ways. We appreciate it.
- If you test this extension and find a bug/have a question, do log an issue.
- If you have fixed any of the issues, do submit a PR.