Fix Psalm

This commit is contained in:
Narek Zakarian 2022-03-15 16:43:14 +04:00
parent 56b4b6635c
commit feb55627a3

View file

@ -226,7 +226,7 @@ class OrderEndpoint {
'application_context' => $this->application_context_repository
->current_context( $shipping_preference )->to_array(),
);
if ( ! empty( $payer->email_address() ) && ! empty( $payer->name() ) ) {
if ( $payer && ! empty( $payer->email_address() ) && ! empty( $payer->name() ) ) {
$data['payer'] = $payer->to_array();
}
if ( $payment_token ) {