Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Incremental free gift(every buy 2 get 1 free) › Reply To: Incremental free gift(every buy 2 get 1 free)
November 3, 2016 at 6:37 pm
#762
Soft79
Keymaster
Yeah, tick the boxes ‘Allow Multiplication’ and ‘BOGO’ and paste this filter in your functions.php:
add_filter( 'wjecf_bogo_product_amount_for_coupon',
function ( $qty, $coupon ) {
if ($coupon->code == 'SOME_COUPON') {
$qty = floor( $qty / 2 );
}
return $qty;
}, 10, 2);
replace SOME_COUPON by your coupon code.