WC_Woo_Helper_Connection::has_host_plan_orderspublic staticWC 1.0

Check if the site has and linked host-plan orders.

Method of the class: WC_Woo_Helper_Connection{}

No Hooks.

Returns

true|false.

Usage

$result = WC_Woo_Helper_Connection::has_host_plan_orders(): bool;

WC_Woo_Helper_Connection::has_host_plan_orders() code WC 10.3.3

public static function has_host_plan_orders(): bool {
	$subscriptions = WC_Helper::get_subscriptions();
	foreach ( $subscriptions as $subscription ) {
		if ( isset( $subscription['included_in_host_plan'] ) && true === (bool) $subscription['included_in_host_plan'] ) {
			return true;
		}
	}

	return false;
}