Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Plugin having JS conflict › Reply To: Plugin having JS conflict
June 19, 2020 at 10:38 am #15899
Soft79
Keymaster
It would be better to select the variations from the Edit Coupon Page instead of the variable (parent) products. That way the out-of-stock items will automatically be hidden and you don’t have issues with the color swatch plugin.
About the BOGO: Must BOGO apply to one product or different products?
If for one product: Uncheck BOGO and fill in the product in the ‘Free products’ and ‘Usage restrictions > Products’ boxes.
If for multiple products, you need to use this filter:
add_filter( 'wjecf_bogo_product_amount_for_coupon', function( $amount, $coupon ) {
if ( strcasecmp( $coupon->get_code(), 'COUPON_CODE_HERE' ) === 0 ) {
$amount = floor($amount / 2);
}
return $amount;
}, 10, 2 );