From d15c1cc82b5cf977c7a409d7cb161981aad03d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reu=CC=88el=20van=20der=20Steege?= Date: Wed, 30 Aug 2023 13:28:01 +0200 Subject: [PATCH] All payment methods are inactive by default. --- src/Gateway.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Gateway.php b/src/Gateway.php index 47cfee8..4430999 100644 --- a/src/Gateway.php +++ b/src/Gateway.php @@ -271,6 +271,11 @@ private function maybe_enrich_payment_methods() { \set_transient( $cache_key, $mollie_payment_methods, \DAY_IN_SECONDS ); } + // All payment methods are inactive by default. + foreach ( $this->payment_methods as $payment_method ) { + $payment_method->set_status( 'inactive' ); + } + $method_transformer = new MethodTransformer(); foreach ( $mollie_payment_methods->_embedded->methods as $mollie_payment_method ) {