Automattic\WooCommerce\Internal\Admin\Settings\PaymentProviders
Mollie::is_in_test_mode
Determine if the payment gateway is in test mode.
Method of the class: Mollie{}
No Hooks.
Returns
true|false
. True if the payment gateway is in test mode, false otherwise.
Usage
$Mollie = new Mollie(); $Mollie->is_in_test_mode( $payment_gateway ): bool;
- $payment_gateway(WC_Payment_Gateway) (required)
- The payment gateway object.
Mollie::is_in_test_mode() Mollie::is in test mode code WC 9.9.4
public function is_in_test_mode( WC_Payment_Gateway $payment_gateway ): bool { $test_mode_enabled = get_option( 'mollie-payments-for-woocommerce_test_mode_enabled', true ); $test_key_entered = get_option( 'mollie-payments-for-woocommerce_test_api_key', true ); return filter_var( $test_mode_enabled, FILTER_VALIDATE_BOOLEAN ) && ! empty( $test_key_entered ); }