WC_Woo_Helper_Connection::get_deleted_connection_noticepublic staticWC 10.6.0

Get the notice for a deleted connection on WCCOM

Method of the class: WC_Woo_Helper_Connection{}

No Hooks.

Returns

String. The notice for a deleted connection on WCCOM.

Usage

$result = WC_Woo_Helper_Connection::get_deleted_connection_notice(): string;

Changelog

Since 10.6.0 Introduced.

WC_Woo_Helper_Connection::get_deleted_connection_notice() code WC 10.8.1

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 <b>%1$s</b> on WooCommerce.com. The connection may have been deleted. To fix this, please reconnect your site to <b>WooCommerce.com</b> to ensure everything works correctly.', 'woocommerce' ),
		$home_url
	);
}