Exchange coupons

Last modified:

When a customer wants to exchange an item rather than just refund it, the plugin can automatically generate a single-use free-shipping coupon so the replacement order doesn’t cost the customer extra shipping.

How it works

  1. The customer chooses I want to exchange in Step 3 of the return flow.
  2. On confirmation, the plugin creates a WooCommerce coupon with:
    • A unique code, e.g. return-1234567-42
    • Free shipping enabled
    • Discount type: Fixed cart discount, amount 0
    • An expiry date, if Free shipping coupon limit is set in the General configuration settings.
  3. The coupon code is shown to the customer in the confirmation message and email (using the {coupon_code} and {coupon_valid_date} placeholders) so they can use it on their replacement order.
  4. The coupon ID is stored on the parent order, and an order note records its creation.

Settings

Go to: WooCommerce → Settings → Returns:

  1. Activate Free shipping coupon – enables coupon generation when a customer chooses to exchange.
  2. Free shipping coupon limit – number of days the coupon stays valid. Set to 0 for no expiry.

Disabling the feature

Set Activate Free shipping coupon to off. The exchange option will still be available to customers in the return flow, but no coupon will be generated – only the customer’s choice and any message they leave is recorded on the return order.

Automatic cleanup

Expired coupons are removed automatically. The plugin uses WooCommerce’s Action Scheduler to run a daily job (arar_cleanup_expired_coupons) that deletes any return coupon whose date_expires is in the past. This keeps the Coupons list tidy and avoids stale coupons piling up over time.