WordPress at Your Fingertips
function is not described

WC_Coupon::is_valid_for_cart() public WC 1.0

Check if a coupon is valid.

{} It's a 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();

Code of WC_Coupon::is_valid_for_cart() WC 5.6.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 );
}