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