Automattic\WooCommerce\Internal\Admin\Settings
PaymentsController::is_woopayments_account_onboarded
Check if the WooPayments account is onboarded.
Method of the class: PaymentsController{}
No Hooks.
Returns
true|false
.
Usage
// private - for code of main (parent) class only $result = $this->is_woopayments_account_onboarded(): bool;
PaymentsController::is_woopayments_account_onboarded() PaymentsController::is woopayments account onboarded code WC 9.9.3
private function is_woopayments_account_onboarded(): bool { // If WooPayments is active right now, we will not get to this point since the plugin is active check is done first. if ( ! class_exists( '\WC_Payments' ) ) { return false; } $account_data = get_option( 'wcpay_account_data', array() ); if ( empty( $account_data['data']['account_id'] ) ) { return false; } if ( empty( $account_data['data']['details_submitted'] ) ) { return false; } // We consider the store to have WooPayments account connected if account data in the WooPayments account cache // contains details_submitted = true entry. This implies that WooPayments was connected. return $account_data['data']['details_submitted']; }