WC_Coupon::is_valid_for_cartpublicWC 1.0

Check if a coupon is valid.

Method of the class: WC_Coupon{}

Hooks from the method

Returns

true|false.

Usage

$WC_Coupon = new WC_Coupon();
$WC_Coupon->is_valid_for_cart();

WC_Coupon::is_valid_for_cart() code WC 11.0.1

public function is_valid_for_cart() {
	return apply_filters( 'woocommerce_coupon_is_valid_for_cart', $this->is_type( wc_get_cart_coupon_types() ), $this );
}