Fix non wc gateway items null enabled key

This commit is contained in:
Emili Castells Guasch 2025-02-13 15:17:22 +01:00
parent b74ad84030
commit 30dd654f83

View file

@ -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;
}