Automattic\WooCommerce\Internal\Admin\Notes

WooSubscriptionsNotes::get_connected_site_id()publicWC 1.0

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

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

Хуков нет.

Возвращает

int|false.

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

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

Код WooSubscriptionsNotes::get_connected_site_id() WC 9.3.3

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

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