Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › spend over $300 get 3 free ItemX › Reply To: spend over $300 get 3 free ItemX

#17922
Soft79
Keymaster

Set minimum spend to 300 and use this snippet (replace COUPON_CODE with the actual coupon code, case sensitive!):


add_filter(
  'wjecf_free_product_amount_for_coupon',
  function ( $amount, $coupon ) {
    if ( $coupon->code == 'COUPON_CODE' && $amount >= 1 ) {
      $amount = 3 * $amount;
    }
    return $amount;
  },
  10,
  2
);