Automattic\WooCommerce\Internal\Admin\Settings\PaymentsProviders
PayPal::is_in_test_mode
Try to determine if the payment gateway is in test mode.
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.
Метод класса: PayPal{}
Хуков нет.
Возвращает
true|false. True if the payment gateway is in test mode, false otherwise.
Использование
$PayPal = new PayPal(); $PayPal->is_in_test_mode( $payment_gateway ): bool;
- $payment_gateway(WC_Payment_Gateway) (обязательный)
- The payment gateway object.
Код PayPal::is_in_test_mode() PayPal::is in test mode WC 10.5.0
public function is_in_test_mode( WC_Payment_Gateway $payment_gateway ): bool {
return $this->is_paypal_in_sandbox_mode( $payment_gateway ) ?? parent::is_in_test_mode( $payment_gateway );
}