Automattic\WooCommerce\Internal\Admin\Settings\PaymentsProviders\WooPayments

WooPaymentsService::has_valid_accountprivateWC 1.0

Determine if WooPayments has a valid, fully onboarded account set up.

Method of the class: WooPaymentsService{}

No Hooks.

Returns

true|false. Whether WooPayments has a valid, fully onboarded account set up.

Usage

// private - for code of main (parent) class only
$result = $this->has_valid_account(): bool;

WooPaymentsService::has_valid_account() code WC 10.7.0

private function has_valid_account(): bool {
	if ( ! $this->has_account() ) {
		return false;
	}

	$account_service = $this->proxy->call_static( '\WC_Payments', 'get_account_service' );

	return $account_service->is_stripe_account_valid();
}