WC_Coupon is_valid() method always return false
-
WC_Coupon
is_valid()
method always return falseThis is my code (you have to set a valid ‘couponcode’):
$coupon = new WC_Coupon( 'couponcode' ); if($coupon->is_valid()) echo 'TRUE'; else echo 'FALSE';
The output is always:
FALSE
Same thing for
is_valid_for_cart()
method
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘WC_Coupon is_valid() method always return false’ is closed to new replies.