Create coupon action

This action lets you create a coupon via the WooCommerce integration. Use it to automate you daily work ans save time and resources.

How to create a coupon

This section aims to help you getting started on how to create a coupon via WooCommerce. Simply select one of your prefered automation manuals down below and start automating your WordPress website in no time.

"Create coupon" arguments

Our so-called arguments are values that you can use to customize your request. They allow you to send specific data to the Create coupon action which is then handled accordingly to the described purpose. You can use the arguments that you would like to send values for.
To learn more about it, please see the Setup Guide above.
coupon_code *

The code that your customers can use during checkout.

type

The coupon type.

amount

The discount amount of the coupon code, based on the selected type.

individual_use

Set this to yes if the coupon cannot be used in conjunction with other coupons. Default: no

product_ids

Add IDs of products in case you want to apply the coupon code only to specific products. This argument accepts a comma-separated string, as well as a JSON construct.

exclude_product_ids

Add IDs of products that you want to exclude from the coupon code. This argument accepts a comma-separated string, as well as a JSON construct.

usage_limit

Set a number if you want to limit the coupon to be used a limited amount of times only. Default: 0 (unlimited)

usage_limit_per_user

Set a number to define whether a user can use the coupon code multiple times. Default: 0 (unlimited)

limit_usage_to_x_items

Define a maximum number of products this coupon can be applied to for each cart. Default: 0 (unlimited)

usage_count

A number that shows how often the code has been already used.

expiry_date

A date when the coupon code expires. Leave empty to never expire it.

enable_free_shipping

Set this to yes to enable free shipping. Default: no

product_category_ids

Add the category IDs you want to add to the coupon. This argument accepts a comma-separated string, as well as a JSON construct.

exclude_product_category_ids

Add the category IDs you want to exclude to the coupon. This argument accepts a comma-separated string, as well as a JSON construct.

exclude_sale_items

Set this to yes to prevent the coupon being applied to items on sale. Default: no

minimum_amount

Set a minimum amount that need to be reached before the coupon can be applied.

maximum_amount

Set a maximum amount of which the coupon can be applied to.

coupon_emails

Add one or multiple emails to the coupon. Only the users with those emails can redeem the code. This argument accepts a comma-separated string, as well as a JSON construct.

description

Add a coupon author. This field accepts a user id.

replace

Set this to yes to replace the existing user_ids. If set to no, the user_ids are appended to the existing ones. Default: no

do_action

Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.

wpwh_call_action

(String) Register a custom WordPress hook callback. The value will be called as followed: do_action( $yourdefinedaction, $action_return_data, $request_data )

Connection examples

Get inspired on how to use the "Create coupon" action within our WooCommerce integrations. Down below you will find various examples with our other integrations.
When a user logged in via The WP User Manager Logo for our WP Webhooks integration WP User Manager, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When an email was sent via The WordPress Logo for our integration WordPress, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When an ACF term field was updated via The Advanced Custom Fields Logo for our WP Webhooks integration Advanced Custom Fields, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a form was submitted via The Contact Form 7 Logo for our integration Contact Form 7, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a ticket was closed via The Fluent Support Logo for our WP Webhooks integration Fluent Support, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a course was completed via The Tutor LMS Logo for our WP Webhooks integration Tutor LMS, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a user completed a unit via The WP Courseware Logo for our WP Webhooks integration WP Courseware, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a donation was revoked via The GiveWP Logo for our WP Webhooks integration GiveWP, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a post was updated via The WordPress Logo for our integration WordPress, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a customer was created via The Woocommerce Logo for our integration WooCommerce, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a free membership was cancelled via The Restrict Content Pro Logo for our WP Webhooks integration Restrict Content Pro, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a coupon was deleted via The Woocommerce Logo for our integration WooCommerce, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When an ACF user field was updated via The Advanced Custom Fields Logo for our WP Webhooks integration Advanced Custom Fields, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a new license was created via The Easy Digital Downloads Logo for our integration Easy Digital Downloads, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a profile photo was updated via The WP User Manager Logo for our WP Webhooks integration WP User Manager, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a tag was added via The WP Fusion Logo for our WP Webhooks integration WP Fusion, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a contact was added to a tag via The FluentCRM Logo for our WP Webhooks integration FluentCRM, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a donation was cancelled via The GiveWP Logo for our WP Webhooks integration GiveWP, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a booking was rejected via The Events Manager Logo for our WP Webhooks integration Events Manager, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a license status was updated via The Easy Digital Downloads Logo for our integration Easy Digital Downloads, create a coupon via The Woocommerce Logo for our integration WooCommerce.
When a form was submitted via The WS Form Logo for our WP Webhooks integration WS Form, create a coupon via The Woocommerce Logo for our integration WooCommerce.

More available WooCommerce endpoints

Discover more of the available endpoints used for the WooCommerce integration.
To learn more about a specific endpoint, simply click on it.
Full disclosure: When clicking on some of the links on our website and purchasing the related product and/or service, we may earn a commission free of any additional cost for you.