woocommerce_coupon_is_valid_for_cart

Closes #5681
This commit is contained in:
Mike Jolley 2014-07-02 15:03:48 +01:00
parent 12cf9edd52
commit 0448165c02
1 changed files with 2 additions and 4 deletions

View File

@ -449,10 +449,8 @@ class WC_Coupon {
* @return bool
*/
public function is_valid_for_cart() {
if ( $this->type != 'fixed_cart' && $this->type != 'percent' )
return false;
else
return true;
$valid = $this->type != 'fixed_cart' && $this->type != 'percent' ? false : true;
return apply_filters( 'woocommerce_coupon_is_valid_for_cart', $valid, $this );
}
/**