Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Add more than 1 free product with a coupon › Reply To: Add more than 1 free product with a coupon

#16814
Soft79
Keymaster

I missed a 10, 2

Does the following work?


add_filter( 'wjecf_free_product_amount_for_coupon', function ( $coupon_qty, $coupon ) { 
  if ( strcasecmp( $coupon->get_code(), 'THE_COUPON_CODE' ) === 0 ) {
    $coupon_qty = 6;
  }
  return $coupon_qty;
}, 10, 2 );