AutomateWoo provides two actions for editing the coupons on a subscription created with WooCommerce Subscriptions. One action to add coupons, and one to remove them.
Add Coupon Action
↑ Back to topThe Add Coupon action can be used to automatically discount future payments for a subscription by applying an existing recurring discount coupon.
To add a coupon to a subscription:
- Go to AutomateWoo > Workflows
- Click Add Workflow
- Click the Trigger select box
- Choose one of the Subscriptions triggers
- Click the Add Action button
- Click Add Coupon action in the Subscriptions section
- Select for the coupon you wish to apply to the subscription. Only recurring coupon types are available for selection.
The coupon will discount the subscription by the amount set on the coupon. This coupon will then be applied to future renewal payments, unless the coupon is removed, either manually, by a Remove Coupon action, or automatically because it is limited to a number of payments. The same coupon code will only be added once to a subscription, so if the subscription already has the coupon applied, it will not be added.
Coupon Validation
↑ Back to topWhen an Add Coupon action is run, the same validation that would be applied to the coupon when adding it to the cart or via the Edit Subscription screen will be applied. This means that the coupon will only be applied to the subscription if it fulfils all requirements, like usage restrictions.
If a coupon fails validation, it will not be applied and an error will be logged for the Workflow. These errors can be tracked on the AutomateWoo > Logs page.
Remove Coupon Action
↑ Back to topThe Remove Coupon action can be used to remove a discount from a subscription. If more than one coupon line item has a code matching the chosen code, all matching coupons will be removed.
To remove a coupon from a subscription:
- Go to AutomateWoo > Workflows
- Click Add Workflow
- Click the Trigger select box
- Choose one of the Subscriptions triggers
- Click the Add Action button
- Click Remove Coupon action in the Subscriptions section
- Select for the code for the coupon you wish to remove
Tracking Coupons Changes
↑ Back to topWhen a coupon is added or removed from a subscription, a note is added to the subscription to record this action. This makes it easier to keep track of the changing coupons on a subscription over its lifecycle.
The note includes:
- Name of the Workflow that added or removed the coupon
- Workflow ID, in case the name of the workflow changes
- Coupon code
The note has the form:
{workflow_name} workflow run: added coupon {code}. (Workflow ID: {workflow_id})
Recommended Triggers
↑ Back to topBy default, Workflows in AutomateWoo run after the event that triggers the workflow. For the add / remove coupon actions to be effective, you need to choose a trigger that occurs before the first payment you want to discount.
The action should also be run as soon as possible so the subscription has the correct coupon line items and totals for the duration of the renewal cycle. This ensures the most accurate details are displayed to the subscriber on their My Account > View Subscription pages, emails and elsewhere.
Because of this, the recommend process for adding or removing coupons is to trigger the action when the previous payment occurs. This can be done using the:
- Subscription Created trigger to modify the coupons included in the 2nd renewal order onwards; and
- Subscription Renewal Payment Complete trigger to modify the products including in the 3rd and each future renewal order.
Requirements
↑ Back to topThe Add / Remove Coupon actions will only work for subscriptions using a payment gateway that supports modifications to the recurring total. This feature is necessary for coupons to be dynamically applied during a subscription’s lifecycle.
Furthermore, the actions will only be available with WooCommerce version 3.2 or newer active. This version of WooCommerce introduced the functionality that makes it possible to add coupons to an order or subscription and have discount amounts correctly calculated.
Use Cases
↑ Back to topBeing able to dynamically add and remove coupons on a subscription has many use cases, especially when combined with AutomateWoo’s advanced Rules.
Some example ways to use these actions to help your store stand out from the crowd:
Loyalty Discounts:Â Provide a discount to loyal subscribers after a given period, like their first year of being an active monthly subscriber.
Multi-tier Pricing:Â Offer products which increase or decrease in cost over their lifecycle by modifying the discounts applied to the subscriptions containing those products.
Bulk Edit Subscriptions:Â Change prices for active subscribers without requiring customers to resubscribe, or editing each subscription manually.
Seasonal Sales:Â Change the discounts a customer receives based on calendar dates for special promotions, like an exclusive Black Friday discount for active subscribers.