/**
* Get phone number args for paypal request.
* @param WC_Order $order
* @return array
*/
protected function get_phone_number_args($order)
{
if (in_array($order->get_billing_country(), array('US', 'CA'))) {
$phone_number = str_replace(array('(', '-', ' ', ')', '.'), '', $order->get_billing_phone());
$phone_number = ltrim($phone_number, '+1');
$phone_args = array('night_phone_a' => substr($phone_number, 0, 3), 'night_phone_b' => substr($phone_number, 3, 3), 'night_phone_c' => substr($phone_number, 6, 4), 'day_phone_a' => substr($phone_number, 0, 3), 'day_phone_b' => substr($phone_number, 3, 3), 'day_phone_c' => substr($phone_number, 6, 4));
} else {
$phone_args = array('night_phone_b' => $order->get_billing_phone(), 'day_phone_b' => $order->get_billing_phone());
}
return $phone_args;
}