Automattic\WooCommerce\Internal\Admin\Settings\PaymentsProviders

KlarnaCheckout::needs_setuppublicWC 1.0

Check if the payment gateway needs setup.

Method of the class: KlarnaCheckout{}

No Hooks.

Returns

true|false. True if the payment gateway needs setup, false otherwise.

Usage

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

KlarnaCheckout::needs_setup() code WC 10.8.1

public function needs_setup( WC_Payment_Gateway $payment_gateway ): bool {
	return ! empty( get_option( 'kco_credentials_error' ) );
}