Automattic\WooCommerce\Admin

PluginsHelper::get_wccom_connected_notice()public staticWC 1.0

Get the connected status notice message.

Method of the class: PluginsHelper{}

No Hooks.

Return

String. the connected notice message.

Usage

$result = PluginsHelper::get_wccom_connected_notice( $user_email );
$user_email(string) (required)
the user email.

PluginsHelper::get_wccom_connected_notice() code WC 9.8.2

public static function get_wccom_connected_notice( $user_email ) {
	if ( ! WC_Helper::is_site_connected() ) {
		return '';
	}

	if ( ! self::should_show_notice( self::DISMISS_CONNECT_NOTICE, false ) ) {
		return '';
	}

	if ( ! $user_email ) {
		return '';
	}

	return sprintf(
	/* translators: 1: Disconnected user email */
		__( 'Successfully connected to <b>%s</b>.', 'woocommerce' ),
		$user_email
	);
}