Skip to content

Commit

Permalink
Merge pull request #1884 from aihimel/feat/pro-2329-product-category-…
Browse files Browse the repository at this point in the history
…include-exclude-vendor-coupon

New Walker added for category dropdown multiselect
  • Loading branch information
mrabbani authored Jul 1, 2024
2 parents d2a44e3 + 44e44d6 commit 54fb2e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/Order/Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ public function ensure_vendor_coupon( $valid, $coupon, $discount ) {
if ( ! apply_filters( 'dokan_ensure_vendor_coupon', true ) ) {
return $valid;
}

// A coupon must be bound with a product

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

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Whitespace found at end of line
// 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( esc_html__( 'A coupon must be restricted with a vendor product.', 'dokan-lite' ) );
throw new Exception( __( 'A coupon must be restricted with a vendor product.', 'dokan-lite' ) );

Check failure on line 355 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

0 comments on commit 54fb2e5

Please sign in to comment.