Automattic\WooCommerce\Admin
PluginsHelper::get_wccom_disconnected_notice
Get notice information when WCCOM connection is disconnected.
Method of the class: PluginsHelper{}
No Hooks.
Returns
String. disconnect notice.
Usage
$result = PluginsHelper::get_wccom_disconnected_notice();
PluginsHelper::get_wccom_disconnected_notice() PluginsHelper::get wccom disconnected notice code WC 10.4.3
public static function get_wccom_disconnected_notice() {
if ( WC_Helper::is_site_connected() ) {
return '';
}
if ( ! self::should_show_notice( self::DISMISS_DISCONNECT_NOTICE, false ) ) {
return '';
}
$user_email = \WC_Helper_Options::get( 'last_disconnected_user_data' )['email'] ?? null;
if ( empty( $user_email ) ) {
return '';
}
return sprintf(
/* translators: 1: Disconnected user email */
__( 'Successfully disconnected from <b>%1$s</b>.', 'woocommerce' ),
$user_email
);
}