diff --git a/includes/class-wc-coupon.php b/includes/class-wc-coupon.php index 39bb6214bf9..05ba55dd860 100644 --- a/includes/class-wc-coupon.php +++ b/includes/class-wc-coupon.php @@ -138,7 +138,7 @@ class WC_Coupon { $coupon = get_post( $coupon_id ); $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; $this->id = $coupon->ID;