🐛 Fix incorrect method-status response

This commit is contained in:
Philipp Stracker 2025-02-14 11:11:33 +01:00
parent 62e1f4b9ac
commit 4073f84454
No known key found for this signature in database

View file

@ -99,12 +99,10 @@ class PaymentSettings extends AbstractDataModel {
public function is_method_enabled( string $method_id ) : bool {
switch ( $method_id ) {
case 'venmo':
$this->get_venmo_enabled();
break;
return $this->get_venmo_enabled();
case 'pay-later':
$this->get_paylater_enabled();
break;
return $this->get_paylater_enabled();
default:
$gateway = $this->get_gateway( $method_id );
@ -112,9 +110,9 @@ class PaymentSettings extends AbstractDataModel {
if ( $gateway ) {
return wc_string_to_bool( $gateway->enabled );
}
}
return false;
return false;
}
}
/**