mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix psalm
This commit is contained in:
parent
5931c7d304
commit
ca6f3dd088
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ class PaymentSourceFactory {
|
|||
*/
|
||||
public function from_wc_order( WC_Order $order, string $birth_date ) {
|
||||
$address = $order->get_address();
|
||||
$phone = filter_input( INPUT_POST, 'billing_phone', FILTER_SANITIZE_STRING ) ?? $address['phone'] ?? '';
|
||||
$phone = filter_input( INPUT_POST, 'billing_phone', FILTER_SANITIZE_STRING ) ?? $address['phone'] ?: '';
|
||||
$phone_country_code = WC()->countries->get_country_calling_code( $address['country'] );
|
||||
$phone_country_code = is_array( $phone_country_code ) && ! empty( $phone_country_code ) ? $phone_country_code[0] : $phone_country_code;
|
||||
if ( is_string( $phone_country_code ) && '' !== $phone_country_code ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue