WC_Helper::is_site_connected()public staticWC 1.0

Checks if access_token exists in auth option.

Method of the class: WC_Helper{}

No Hooks.

Return

true|false.

Usage

$result = WC_Helper::is_site_connected(): bool;

WC_Helper::is_site_connected() code WC 9.0.1

public static function is_site_connected(): bool {
	$auth = WC_Helper_Options::get( 'auth' );

	// If `access_token` is empty, there's no active connection.
	return ! empty( $auth['access_token'] );
}