fix case-insensitive matching for coupon posts with uppercase chars
This commit is contained in:
parent
0a2b75db82
commit
3ea4e79b82
|
@ -138,7 +138,7 @@ class WC_Coupon {
|
||||||
$coupon = get_post( $coupon_id );
|
$coupon = get_post( $coupon_id );
|
||||||
$this->post_title = apply_filters( 'woocommerce_coupon_code', $coupon->post_title );
|
$this->post_title = apply_filters( 'woocommerce_coupon_code', $coupon->post_title );
|
||||||
|
|
||||||
if ( empty( $coupon ) || $this->code !== $coupon->post_title )
|
if ( empty( $coupon ) || $this->code !== $this->post_title )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$this->id = $coupon->ID;
|
$this->id = $coupon->ID;
|
||||||
|
|
Loading…
Reference in New Issue