Up to date instructions on how to install the plugin via the GUI can be found on our docs site.
The following instructions are for developers who wish to install the plugin manually.
git clone git@github.com:two-inc/woocommerce-plugin.git
cd woocommerce-plugin
make archivewp plugin install tillit-payment-gateway --activateThis will produce a zip file which can be uploaded to your Wordpress site.
Ensure that you have bumpver installed.
pip install -r dev-requirements.txt
To bump version:
bumpver update --major | --minor | --patch
Now, go to Github to create a new release which triggers publication of the new version to Wordpress plugin directory.
Also, if you wish to use a locally running Checkout API backend, no additional setup is required.
If you wish to use the staging site,
echo WOOCOM_PLUGIN_CONFIG_JSON=docker/config/staging.json >> .env
cat > docker/config/staging.json <<EOF
{
"enabled": "yes",
"title": "Business invoice %s days",
"subtitle": "Receive the invoice via PDF and email",
"test_checkout_host": "https://api.staging.two.inc",
"clear_options_on_deactivation": "no",
"section_api_credentials": "",
"api_key": "secret_test_xxx",
"section_checkout_options": "",
"enable_order_intent": "yes",
"add_field_department": "yes",
"add_field_project": "yes",
"add_field_purchase_order_number": "yes",
"add_field_invoice_email": "yes",
"show_abt_link": "yes",
"section_auto_complete_settings": "",
"enable_company_search": "yes",
"enable_company_search_for_others": "yes",
"enable_address_lookup": "yes"
}
EOFNow you can bring up your Wordpress instance:
docker-compose up -dNavigate to http://localhost:8888/ on your browser to access the Wordpress site.
Playwright e2e tests live in tests/e2e/. They run against the local Docker environment and verify the full checkout flow with Two payment.
- Docker running with the plugin config (see above)
- Node.js 22+
- A merchant API key (from GCP Secret Manager or your local config)
- Two admin password (for the fulfilment batch trigger)
docker compose up -d
# wait ~90s for wpcli bootstrap to finish (installs WooCommerce, creates products, activates plugin)
make e2e-installexport MERCHANT_API_KEY=$(gcloud secrets versions access latest --secret=STAGING_SHOP_MERCHANT_API_KEY_TILLITTESTUK --project=two-beta)
export TWO_ADMIN_PASSWORD=$(gcloud secrets versions access latest --secret=STAGING_TWO_ADMIN_PASSWORD --project=two-beta)
make e2e-test # headless
make e2e-test-headed # with browser visibleOr if you have a local docker/config/staging-tillittestuk.json:
export MERCHANT_API_KEY=$(python3 -c "import json; print(json.load(open('docker/config/staging-tillittestuk.json'))['api_key'])")| Test | What it does |
|---|---|
order-flow.spec.ts |
Place order → verify CONFIRMED → fulfil via WP admin → verify FULFILLED → refund → verify REFUNDED |
cancel-order.spec.ts |
Place order → cancel via WP admin → verify CANCELLED |
max-limit.spec.ts |
Add expensive product → expect rejection on checkout |
If products stop showing or the store behaves oddly between runs:
docker compose down -v && rm -rf volumes/
docker compose up -dOnce Wordpress has been set up, a recommended plugin theme to install is:
- Elementor, select an e-commerce template WooCommerce then needs to be installed as a plugin Other recommended WooCommerce plugins are:
- WooCommerce Cart Abdandonment Recovery
- WooCommerce Shipping & Tax
- Webhooks (merchant dashboard -> woocommerce)
- Orders are stored in
wp_postsandwp_postmeta(also some stuff inwp_woocommerce_order_*(update_post_*function in PHP)