Automattic\WooCommerce\Internal\Admin\Notes

WooSubscriptionsNotes::get_connected_site_id()publicWC 1.0

Returns the WooCommerce.com provided site ID for this site.

Method of the class: WooSubscriptionsNotes{}

No Hooks.

Return

Int|false.

Usage

$WooSubscriptionsNotes = new WooSubscriptionsNotes();
$WooSubscriptionsNotes->get_connected_site_id();

WooSubscriptionsNotes::get_connected_site_id() code WC 7.1.0

public function get_connected_site_id() {
	if ( ! $this->is_connected() ) {
		return false;
	}

	$auth = \WC_Helper_Options::get( 'auth' );
	return absint( $auth['site_id'] );
}