%1$s, but your actual site URL is %2$s. To fix this, please reconnect your site to WooCommerce.com to ensure everything works correctly.', 'woocommerce' ),
$url,
$home_url
);
}
/**
* Get the notice for a deleted connection on WCCOM
*
* @return string The notice for a deleted connection on WCCOM.
*
* @since 10.6.0
*/
public static function get_deleted_connection_notice(): string {
$connection_data = WC_Helper::get_cached_connection_data();
if ( false === $connection_data || empty( $connection_data['maybe_deleted_connection'] ) ) {
return '';
}
$home_url = esc_html( rtrim( home_url(), '/' ) );
return sprintf(
/* translators: 1: home URL */
__( 'There is no connection for %1$s on WooCommerce.com. The connection may have been deleted. To fix this, please reconnect your site to WooCommerce.com to ensure everything works correctly.', 'woocommerce' ),
$home_url
);
}
/**
* Check if the site has and linked host-plan orders.
*
* @return bool
*/
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;
}
}