mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #536 from woocommerce/PCP-564-pay-for-order-guest-failing
Check if payer's Email and name are set before sending data
This commit is contained in:
commit
50e282aba5
2 changed files with 25 additions and 4 deletions
|
@ -226,7 +226,7 @@ class OrderEndpoint {
|
|||
'application_context' => $this->application_context_repository
|
||||
->current_context( $shipping_preference )->to_array(),
|
||||
);
|
||||
if ( $payer ) {
|
||||
if ( $payer && ! 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