Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Buy 1 Get 1 with 3 items Max in 1 Purchase › Reply To: Buy 1 Get 1 with 3 items Max in 1 Purchase
December 1, 2020 at 8:24 am #16949
Soft79
Keymaster
Tick the box ‘Allow multiplication of the free products’ and BOGO and use this snippet:
add_filters( 'wjecf_bogo_product_amount_for_coupon', function( $qty, $coupon ) {
if ( strcasecmp( $coupon->get_code(), 'THE_COUPON_CODE' ) === 0 ) {
$qty -= floor( $qty / 4 );
}
return $qty;
}, 10, 2 );
Note: replace THE_COUPON_CODE with the actual coupon-code. Untested.