WC_Woo_Helper_Connection::has_host_plan_orderspublic staticWC 1.0

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

Метод класса: WC_Woo_Helper_Connection{}

Хуков нет.

Возвращает

true|false.

Использование

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

Код WC_Woo_Helper_Connection::has_host_plan_orders() WC 11.0.1

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;
}