Automattic\WooCommerce\Internal\Admin\Settings\PaymentsProviders\WooPayments
WooPaymentsService::has_working_wpcom_connection
Check if the store has a working WPCOM connection.
The store is considered to have a working WPCOM connection if:
- The store is connected to WPCOM (blog ID and tokens are set).
- The store connection has a connected owner (connection owner is set).
Method of the class: WooPaymentsService{}
No Hooks.
Returns
true|false. Whether the store has a working WPCOM connection.
Usage
// private - for code of main (parent) class only $result = $this->has_working_wpcom_connection(): bool;
WooPaymentsService::has_working_wpcom_connection() WooPaymentsService::has working wpcom connection code WC 10.7.0
private function has_working_wpcom_connection(): bool {
return $this->wpcom_connection_manager->is_connected() && $this->wpcom_connection_manager->has_connected_owner();
}