Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Buy 12, get 12 Free › Reply To: Buy 12, get 12 Free
October 11, 2016 at 7:58 pm
#683
Soft79
Keymaster
Enable multiplication of free products and use this snippet:
‘
add_filter( ‘wjecf_free_product_amount_for_coupon’, ‘wjecf_free_product_amount_for_coupon’, 10, 2 );
function wjecf_free_product_amount_for_coupon( $amount, $coupon ) {
if ( $coupon->code == ‘COUPON_CODE‘ && $amount >= 1 ) {
$amount = 12 * $amount;
}
return $amount;
}
‘