billing_phone

This commit is contained in:
Mike Jolley 2016-08-05 16:09:04 +01:00
parent 7685587b22
commit 007a767657
11 changed files with 16 additions and 16 deletions

View File

@ -678,8 +678,8 @@ class WC_Admin_Post_Types {
echo '–';
}
if ( $the_order->billing_phone ) {
echo '<small class="meta">' . __( 'Tel:', 'woocommerce' ) . ' ' . esc_html( $the_order->billing_phone ) . '</small>';
if ( $the_order->get_billing_phone() ) {
echo '<small class="meta">' . __( 'Tel:', 'woocommerce' ) . ' ' . esc_html( $the_order->get_billing_phone() ) . '</small>';
}
break;

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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() )
);
}

View File

@ -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,

View File

@ -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;

View File

@ -37,10 +37,10 @@ if ( ! defined( 'ABSPATH' ) ) {
</tr>
<?php endif; ?>
<?php if ( $order->billing_phone ) : ?>
<?php if ( $order->get_billing_phone() ) : ?>
<tr>
<th><?php _e( 'Telephone:', 'woocommerce' ); ?></th>
<td><?php echo esc_html( $order->billing_phone ); ?></td>
<td><?php echo esc_html( $order->get_billing_phone() ); ?></td>
</tr>
<?php endif; ?>