Automattic\WooCommerce\Internal\Admin

WcPayWelcomePage::has_wcpay_account()privateWC 1.0

Whether a WCPay account exists. By checking account data cache.

Method of the class: WcPayWelcomePage{}

No Hooks.

Return

true|false.

Usage

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

WcPayWelcomePage::has_wcpay_account() code WC 7.1.0

private function has_wcpay_account(): bool {
	$account_data = get_option( 'wcpay_account_data' );
	return isset( $account_data['data'] ) && is_array( $account_data['data'] ) && ! empty( $account_data['data'] );
}