Automattic\WooCommerce\Internal\Admin\Settings\PaymentsProviders

Komoju::is_in_test_mode_onboarding │ public │ WC 1.0

Try to determine if the payment gateway is in test mode onboarding (aka sandbox).

This is a best-effort attempt, as there is no standard way to determine this. Trust the true value, but don't consider a false value as definitive.

Метод класса: Komoju{}

Хуков нет.

Возвращает

bool. True if the payment gateway is in test mode onboarding, false otherwise.

Использование

$Komoju = new Komoju();
$Komoju->is_in_test_mode_onboarding( $payment_gateway ): bool;
$payment_gateway(WC_Payment_Gateway) (обязательный)
The payment gateway object.

Код Komoju::is_in_test_mode_onboarding() WC 11.2.2

public function is_in_test_mode_onboarding( WC_Payment_Gateway $payment_gateway ): bool {
	// A `sk_test_` key is a sandbox credential, so the account itself is a test account,
	// not just a live account processing test payments. KOMOJU exposes no separate
	// onboarding environment signal, so the same check answers both questions.
	return $this->is_komoju_in_sandbox_mode( $payment_gateway ) ?? parent::is_in_test_mode_onboarding( $payment_gateway );
}