From 30dd654f831823c111193908a6b055b62947bced Mon Sep 17 00:00:00 2001 From: Emili Castells Guasch Date: Thu, 13 Feb 2025 15:17:22 +0100 Subject: [PATCH] Fix non wc gateway items null enabled key --- modules/ppcp-settings/src/Endpoint/PaymentRestEndpoint.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ppcp-settings/src/Endpoint/PaymentRestEndpoint.php b/modules/ppcp-settings/src/Endpoint/PaymentRestEndpoint.php index 5047b484d..772d4e19f 100644 --- a/modules/ppcp-settings/src/Endpoint/PaymentRestEndpoint.php +++ b/modules/ppcp-settings/src/Endpoint/PaymentRestEndpoint.php @@ -710,10 +710,10 @@ class PaymentRestEndpoint extends RestEndpoint { if ( ! isset( $all_gateways[ $key ] ) && isset( $request_data[ $key ] ) ) { switch ( $key ) { case 'venmo': - $this->settings->set_venmo_enabled( $request_data[ $key ]['enabled'] ); + $this->settings->set_venmo_enabled( $request_data[ $key ]['enabled'] ?? false ); break; case 'pay-later': - $this->settings->set_paylater_enabled( $request_data[ $key ]['enabled'] ); + $this->settings->set_paylater_enabled( $request_data[ $key ]['enabled'] ?? false ); break; }