| @@ -25,12 +25,9 @@ | ||
| 25 | 25 | * @param string $coupon_code Coupon code. |
| 26 | 26 | * @return float |
| 27 | 27 | */ |
| 28 | 28 | function disco_disable_coupon_application( $valid, $coupon, $discount ) { |
| 29 | - if( | |
| 30 | - Settings::get( 'discount_priority_type' ) === 'woocommerce_coupon' || | |
| 31 | - Settings::get( 'discount_priority_type' ) === 'both' | |
| 32 | - ) { | |
| 29 | + if ( Settings::get( 'discount_priority_type' ) === 'both' ) { | |
| 33 | 30 | return $valid; // Allow coupon validation if the setting is enabled. |
| 34 | 31 | } |
| 35 | 32 | return false; // This will prevent all coupons from being valid |
| 36 | 33 | } |