diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index bb6f2c30b3a..0805f9ffc55 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -678,8 +678,8 @@ class WC_Admin_Post_Types { echo '–'; } - if ( $the_order->billing_phone ) { - echo '' . __( 'Tel:', 'woocommerce' ) . ' ' . esc_html( $the_order->billing_phone ) . ''; + if ( $the_order->get_billing_phone() ) { + echo '' . __( 'Tel:', 'woocommerce' ) . ' ' . esc_html( $the_order->get_billing_phone() ) . ''; } break; diff --git a/includes/api/legacy/v1/class-wc-api-customers.php b/includes/api/legacy/v1/class-wc-api-customers.php index f5c30b1bb3d..acffcedc999 100644 --- a/includes/api/legacy/v1/class-wc-api-customers.php +++ b/includes/api/legacy/v1/class-wc-api-customers.php @@ -378,7 +378,7 @@ class WC_API_Customers extends WC_API_Resource { 'postcode' => $order->billing_postcode, 'country' => $order->billing_country, 'email' => $order->get_billing_email(), - 'phone' => $order->billing_phone, + 'phone' => $order->get_billing_phone(), ), 'shipping_address' => array( 'first_name' => $order->shipping_first_name, diff --git a/includes/api/legacy/v1/class-wc-api-orders.php b/includes/api/legacy/v1/class-wc-api-orders.php index 9bf090035ae..0145ecaef59 100644 --- a/includes/api/legacy/v1/class-wc-api-orders.php +++ b/includes/api/legacy/v1/class-wc-api-orders.php @@ -148,7 +148,7 @@ class WC_API_Orders extends WC_API_Resource { 'postcode' => $order->billing_postcode, 'country' => $order->billing_country, 'email' => $order->get_billing_email(), - 'phone' => $order->billing_phone, + 'phone' => $order->get_billing_phone(), ), 'shipping_address' => array( 'first_name' => $order->shipping_first_name, diff --git a/includes/api/legacy/v2/class-wc-api-customers.php b/includes/api/legacy/v2/class-wc-api-customers.php index 810cbb0bf68..f72ffb5bbb3 100644 --- a/includes/api/legacy/v2/class-wc-api-customers.php +++ b/includes/api/legacy/v2/class-wc-api-customers.php @@ -641,7 +641,7 @@ class WC_API_Customers extends WC_API_Resource { 'postcode' => $order->billing_postcode, 'country' => $order->billing_country, 'email' => $order->get_billing_email(), - 'phone' => $order->billing_phone, + 'phone' => $order->get_billing_phone(), ), 'shipping_address' => array( 'first_name' => $order->shipping_first_name, diff --git a/includes/api/legacy/v2/class-wc-api-orders.php b/includes/api/legacy/v2/class-wc-api-orders.php index 1b9586d02b1..94041f909da 100644 --- a/includes/api/legacy/v2/class-wc-api-orders.php +++ b/includes/api/legacy/v2/class-wc-api-orders.php @@ -186,7 +186,7 @@ class WC_API_Orders extends WC_API_Resource { 'postcode' => $order->billing_postcode, 'country' => $order->billing_country, 'email' => $order->get_billing_email(), - 'phone' => $order->billing_phone, + 'phone' => $order->get_billing_phone(), ), 'shipping_address' => array( 'first_name' => $order->shipping_first_name, diff --git a/includes/api/legacy/v3/class-wc-api-customers.php b/includes/api/legacy/v3/class-wc-api-customers.php index ffdd2bdccdd..b2e87b1a95d 100644 --- a/includes/api/legacy/v3/class-wc-api-customers.php +++ b/includes/api/legacy/v3/class-wc-api-customers.php @@ -630,7 +630,7 @@ class WC_API_Customers extends WC_API_Resource { 'postcode' => $order->billing_postcode, 'country' => $order->billing_country, 'email' => $order->get_billing_email(), - 'phone' => $order->billing_phone, + 'phone' => $order->get_billing_phone(), ), 'shipping_address' => array( 'first_name' => $order->shipping_first_name, diff --git a/includes/api/legacy/v3/class-wc-api-orders.php b/includes/api/legacy/v3/class-wc-api-orders.php index 8f4bf0bc654..3cd6f30bd41 100644 --- a/includes/api/legacy/v3/class-wc-api-orders.php +++ b/includes/api/legacy/v3/class-wc-api-orders.php @@ -192,7 +192,7 @@ class WC_API_Orders extends WC_API_Resource { 'postcode' => $order->billing_postcode, 'country' => $order->billing_country, 'email' => $order->get_billing_email(), - 'phone' => $order->billing_phone, + 'phone' => $order->get_billing_phone(), ), 'shipping_address' => array( 'first_name' => $order->shipping_first_name, diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php index 4ab88d3c38d..f07ac5758db 100644 --- a/includes/class-wc-emails.php +++ b/includes/class-wc-emails.php @@ -465,10 +465,10 @@ class WC_Emails { ); } - if ( $order->billing_phone ) { + if ( $order->get_billing_phone() ) { $fields['billing_phone'] = array( 'label' => __( 'Tel', 'woocommerce' ), - 'value' => wptexturize( $order->billing_phone ) + 'value' => wptexturize( $order->get_billing_phone() ) ); } diff --git a/includes/cli/class-wc-cli-order.php b/includes/cli/class-wc-cli-order.php index edede90158e..2c487eb80b9 100644 --- a/includes/cli/class-wc-cli-order.php +++ b/includes/cli/class-wc-cli-order.php @@ -661,7 +661,7 @@ class WC_CLI_Order extends WC_CLI_Command { 'postcode' => $order->billing_postcode, 'country' => $order->billing_country, 'email' => $order->get_billing_email(), - 'phone' => $order->billing_phone, + 'phone' => $order->get_billing_phone(), ), 'shipping_address' => array( 'first_name' => $order->shipping_first_name, diff --git a/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php b/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php index a698b7c20dd..05fc28cf43f 100644 --- a/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php +++ b/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php @@ -103,7 +103,7 @@ class WC_Gateway_Paypal_Request { */ protected function get_phone_number_args( $order ) { if ( in_array( $order->billing_country, array( 'US','CA' ) ) ) { - $phone_number = str_replace( array( '(', '-', ' ', ')', '.' ), '', $order->billing_phone ); + $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 ), @@ -115,8 +115,8 @@ class WC_Gateway_Paypal_Request { ); } else { $phone_args = array( - 'night_phone_b' => $order->billing_phone, - 'day_phone_b' => $order->billing_phone + 'night_phone_b' => $order->get_billing_phone(), + 'day_phone_b' => $order->get_billing_phone() ); } return $phone_args; diff --git a/templates/order/order-details-customer.php b/templates/order/order-details-customer.php index 088ee9ac1ca..11a3f204583 100644 --- a/templates/order/order-details-customer.php +++ b/templates/order/order-details-customer.php @@ -37,10 +37,10 @@ if ( ! defined( 'ABSPATH' ) ) { - billing_phone ) : ?> + get_billing_phone() ) : ?>