WC_Woo_Helper_Connection::has_host_plan_orders
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() 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;
}