Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backward compatibility added #1916

2 changes: 1 addition & 1 deletion includes/Order/Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@
$available_vendors = array_unique( $available_vendors );

if ( $coupon->is_type( 'fixed_cart' ) && count( $available_vendors ) > 1 ) {
throw new Exception( __( 'This coupon is invalid for multiple vendors.', 'dokan-lite' ) );

Check failure on line 332 in includes/Order/Hooks.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '__'.
}

// Make sure applied coupon created by admin
Expand All @@ -341,9 +341,9 @@
return $valid;
}

// A coupon must be bound with a product
// A coupon must be bound with a product if pro is deactivated
if ( ! dokan()->is_pro_exists() && count( $coupon->get_product_ids() ) === 0 ) {
throw new Exception( __( 'A coupon must be restricted with a vendor product.', 'dokan-lite' ) );

Check failure on line 346 in includes/Order/Hooks.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '__'.
}

$coupon_id = $coupon->get_id();
Expand Down
Loading