WC_Woo_Helper_Connection::get_connection_url_notice
Check if the Woo Update Manager plugin is active.
Method of the class: WC_Woo_Helper_Connection{}
No Hooks.
Returns
true|false.
Usage
$result = WC_Woo_Helper_Connection::get_connection_url_notice(): string;
WC_Woo_Helper_Connection::get_connection_url_notice() WC Woo Helper Connection::get connection url notice code WC 10.3.3
public static function get_connection_url_notice(): string {
$connection_data = WC_Helper::get_cached_connection_data();
if ( false === $connection_data || false === $connection_data['alert_url_mismatch'] ) {
return '';
}
$auth = WC_Helper_Options::get( 'auth' );
$url = rtrim( $auth['url'], '/' );
$home_url = rtrim( home_url(), '/' );
if ( empty( $url ) || $home_url === $url ) {
return '';
}
return sprintf(
/* translators: 1: WooCommerce.com connection URL, 2: home URL */
__( 'Your site is currently connected to WooCommerce.com using <b>%1$s</b>, but your actual site URL is <b>%2$s</b>. To fix this, please reconnect your site to <b>WooCommerce.com</b> to ensure everything works correctly.', 'woocommerce' ),
$url,
$home_url
);
}