WooCommerce Zapier is built with third party developers in mind.
The WooCommerce REST API and WooCommerce webhooks are used extensively for the integration.
We are unable to provide support for writing custom code, so you may need to enlist the support of a professional WordPress/WooCommerce developer if you need assistance.
Endpoint definitions are relative.
| || ||Authentication|
| || ||REST Index|
| || ||Authentication test|
| || ||Bookings Resource1|
| || ||Coupons Resource|
| || ||Customers Resource|
| || ||Orders Resource|
| || ||Products Resource|
| || ||Subscriptions Resource2|
| || ||Webhooks|
| || ||Webhooks Topics|
To authenticate, issue a
POST request to the
/wc-zapier-auth/v1/authenticate endpoint with a valid WordPress administrator username and password. With WordPress 5.6 and above you may want to use an “Application Password” as provide greater compatibility with third-party plugins.
Upon successful authentication the response will include a consumer key/secret what you can use for authorisation.
You may use HTTP Basic Auth header by providing the REST API Consumer Key as the username and the REST API Consumer Secret as the password.
curl https://www.example.com/wp-json/wc-zapier/v1/orders \ -u consumer_key:consumer_secret
Occasionally some servers may not parse the Authorisation header correctly (if you see a “Consumer key is missing” error when authenticating over SSL, you have a server issue). In this case, you may provide the consumer key/secret as query string parameters instead.
The WooCommerce Zapier endpoint behaviours are based on the WooCommerce REST API version 3. For detailed information by endpoints, please see the original documentations:
Even though the WooCommerce Zapier integration is based on the above endpoints, it does not support the following functionality:
- No batch actions.
- No delete support (only create, update and search).
- No subtype access. For example: Order notes, Product variation, Product attributes.
Extending Zapier Integration¶
Modifying or Extending Data and Fields¶
To customise (i.e. add to or modify) the WooCommerce data that is sent to a Zapier trigger via a Webhook, you have to add your data and/or fields to the relevant WooCommerce REST API endpoint.
This is typically done using readily available WooCommerce and WordPress filters and hooks to add your fields to WooCommerce’s built in REST API endpoints.
Modifying output data:
You can use the general WordPress
rest_post_dispatch filter, or any other more Resource-specific WooCommerce filters.
Accessing incoming data:
You can use the general WooCommerce
woocommerce_rest_$THIS->POST_TYPE_query filter, or any other more Resource or Actions specific WooCommerce filters.
If you are adding any new fields to the endpoints, please ensure that you add schema definitions for the new fields. This is required because the WooCommerce Zapier integration relies on endpoint schema definitions to understand which data fields are available for each resource/endpoint. For example you can use the
woocommerce_rest_$OBJECT_TYPE_schema filter to do that.
You can easily translate the WooCommerce Extension interface to your language using the provided
languages/woocommerce-zapier.pot file as a starting point.
If you do translate WooCommerce Zapier, please contact us and send us the translation file so that we can include it in the extension for others to benefit from.
REST API Logs¶
To understand how WooCommerce Zapier uses the REST API, you may wish to install the REST API Log Plugin.
After installing the plugin, trigger a few of your Zaps and then navigate to WordPress Dashboard → Side Menu → Tools → Rest API Log screen to see which endpoints are queried.