Automattic\WooCommerce\Internal\Admin\Settings\PaymentProviders

PaymentGateway::is_onboarding_startedpublicWC 1.0

Check if the payment gateway has started the onboarding process.

Method of the class: PaymentGateway{}

No Hooks.

Returns

true|false. True if the payment gateway has started the onboarding process, false otherwise. If the payment gateway does not provide the information, it will infer it from having a connected account.

Usage

$PaymentGateway = new PaymentGateway();
$PaymentGateway->is_onboarding_started( $payment_gateway ): bool;
$payment_gateway(WC_Payment_Gateway) (required)
The payment gateway object.

PaymentGateway::is_onboarding_started() code WC 9.9.3

public function is_onboarding_started( WC_Payment_Gateway $payment_gateway ): bool {
	if ( is_callable( array( $payment_gateway, 'is_onboarding_started' ) ) ) {
		return filter_var( $payment_gateway->is_onboarding_started(), FILTER_VALIDATE_BOOLEAN );
	}

	// Fall back to inferring this from having a connected account.
	return $this->is_account_connected( $payment_gateway );
}