WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Utilities

CartController::has_coupon() public WC 1.0

See if cart has applied coupon by code.

{} It's a method of the class: CartController{}

No Hooks.

Return

true|false.

Usage

$CartController = new CartController();
$CartController->has_coupon( $coupon_code );
$coupon_code(string) (required)
Cart coupon code.

Code of CartController::has_coupon() WC 5.6.0

public function has_coupon( $coupon_code ) {
	$cart = $this->get_cart_instance();
	return $cart->has_discount( $coupon_code );
}