WC_Coupon::is_valid_for_cart()publicWC 1.0

Check if a coupon is valid.

Method of the class: WC_Coupon{}

Hooks from the method

Return

true|false.

Usage

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

WC_Coupon::is_valid_for_cart() code WC 8.7.0

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