Recovery coupons give your abandoned cart emails an extra incentive to bring customers back. When enabled, the plugin automatically generates a unique, single-use WooCommerce coupon for each abandoned cart and sends the coupon code to Mautic for use in your recovery email templates.
Enabling Coupon Generation
The Enable Coupon Generation checkbox is located in the Recovery Coupon section of the Abandoned Cart settings tab. It is disabled by default. When you enable it, the plugin will generate a coupon each time an abandoned cart is synced to Mautic.
Coupon Settings
There are four settings that control how recovery coupons work:
- Discount Amount – The percentage discount applied by the coupon. Accepts a value between 1 and 100. The default is 10%.
- Coupon Expiry – The number of days before the coupon expires. The default is 7 days. After this period, the coupon can no longer be used.
- Auto-apply on Recovery – When enabled (default), the coupon is automatically applied to the cart when the customer clicks the recovery link. The customer sees the discount immediately on the checkout page without needing to enter a code manually.
- Minimum Cart Value – The minimum cart total required for the coupon to be valid. Set to 0 (the default) for no minimum. If you set this to 50, for example, the coupon will only work when the cart total is at least 50 in your store’s currency.
How Coupons Are Generated
Coupons are created during the abandoned cart sync cron, not at the moment the cart is captured. The process works as follows:
- The cron job detects an abandoned cart and syncs it to Mautic.
- If the sync is successful and coupon generation is enabled, the plugin creates a new WooCommerce coupon with a unique code in the format
MWOO-RECOVER-XXXXXX(where XXXXXX is a random string). - The coupon is configured as a percentage discount, limited to a single use, and restricted to the customer’s email address.
- The coupon code is stored in the abandoned carts database table and pushed to the Mautic contact’s
mautic_woo_coupon_codefield.
Each abandoned cart gets its own unique coupon. Coupons are never reused across different carts or customers.
Coupon Properties
Every generated coupon has the following properties:
- Discount type – Percentage discount
- Usage limit – 1 (single use)
- Individual use – Yes (cannot be combined with other coupons)
- Email restriction – Locked to the email address of the customer who abandoned the cart
- Expiry date – Set based on the coupon expiry days setting
- Minimum spend – Set based on the minimum cart value setting (0 means no minimum)
Using the Coupon Code in Mautic Emails
The coupon code is stored on the Mautic contact in a custom field called mautic_woo_coupon_code. You can insert it into your Mautic email templates using the contact field token:
{contactfield=mautic_woo_coupon_code}
For example, you might write in your recovery email: “Use code {contactfield=mautic_woo_coupon_code} at checkout for 10% off your order!”
Coupon Cleanup
Coupons are managed automatically throughout their lifecycle:
- On recovery – When a customer completes their purchase, the associated coupon is moved to the trash in WooCommerce.
- On expiry – The daily cleanup cron trashes coupons that have passed their expiration date.
- Old cart cleanup – When cart records older than 90 days are deleted, any associated coupons are cleaned up as well.
This means you do not need to manually manage recovery coupons. They are created, used, and cleaned up automatically.