mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Check if payer's email and name are set before sending payer data
This commit is contained in:
parent
3afb73d34c
commit
6d755d44a8
1 changed files with 1 additions and 1 deletions
|
@ -226,7 +226,7 @@ class OrderEndpoint {
|
|||
'application_context' => $this->application_context_repository
|
||||
->current_context( $shipping_preference )->to_array(),
|
||||
);
|
||||
if ( $payer ) {
|
||||
if ( ! empty( $payer->email_address() ) && ! empty( $payer->name() ) ) {
|
||||
$data['payer'] = $payer->to_array();
|
||||
}
|
||||
if ( $payment_token ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue