Automattic\WooCommerce\Admin

PluginsHelper::get_wccom_disconnected_notice()public staticWC 1.0

Get notice information when WCCOM connection is disconnected.

Метод класса: PluginsHelper{}

Хуков нет.

Возвращает

Строку. disconnect notice.

Использование

$result = PluginsHelper::get_wccom_disconnected_notice();

Код PluginsHelper::get_wccom_disconnected_notice() WC 9.7.1

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
	);
}