This commit is contained in:
dinamiko 2022-11-09 11:39:39 +01:00
parent 5bb46c0637
commit ee982a3fed

View file

@ -167,8 +167,9 @@ class PayUponInvoiceHelper {
'country',
);
foreach ( $address as $key => $value ) {
if ( in_array( $key, $required_fields, true ) && $value === '' ) {
foreach ( $required_fields as $key ) {
$value = $address[ $key ] ?? '';
if ( $value === '' ) {
return false;
}
}