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
November 19, 2020 at 5:03 pm #16812
Soft79
Keymaster
You can paste the following snippet in your child theme’s functions.php. Replace THE_COUPON_CODE with the actual coupon code.
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;
} );
(Untested)