Merge branch 'issue/21062' of https://github.com/kakshak/woocommerce into kakshak-issue/21062
This commit is contained in:
commit
eee61b7880
|
@ -764,12 +764,12 @@ class WC_Discounts {
|
|||
* @return bool
|
||||
*/
|
||||
protected function validate_coupon_sale_items( $coupon ) {
|
||||
if ( $coupon->get_exclude_sale_items() ) {
|
||||
$valid = false;
|
||||
if ( $coupon->get_exclude_sale_items() && 'fixed_product' !== $coupon->get_discount_type() ) {
|
||||
$valid = true;
|
||||
|
||||
foreach ( $this->get_items_to_validate() as $item ) {
|
||||
if ( $item->product && ! $item->product->is_on_sale() ) {
|
||||
$valid = true;
|
||||
if ( $item->product && $item->product->is_on_sale() ) {
|
||||
$valid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue