Skip to content

Commit

Permalink
fix: Sanitize coupon code
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdiyazdani committed Sep 2, 2023
1 parent cb4b044 commit e2ed8d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WooCommerce/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function apply_coupon_via_url() {
return;
}

WC()->cart->add_discount( wc_clean( $coupon_code ) );
WC()->cart->add_discount( wc_sanitize_coupon_code( $coupon_code ) );
}

/**
Expand Down

0 comments on commit e2ed8d3

Please sign in to comment.