mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 14:57:26 +08:00
Refactor
This commit is contained in:
parent
5bb46c0637
commit
ee982a3fed
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue