diff --git a/includes/api/class-wc-rest-orders-controller.php b/includes/api/class-wc-rest-orders-controller.php index 471d89c9baf..a54aa29e777 100644 --- a/includes/api/class-wc-rest-orders-controller.php +++ b/includes/api/class-wc-rest-orders-controller.php @@ -148,7 +148,7 @@ class WC_REST_Orders_Controller extends WC_REST_Posts_Controller { 'payment_method' => $order->get_payment_method(), 'payment_method_title' => $order->get_payment_method_title(), 'transaction_id' => $order->get_transaction_id(), - 'customer_ip_address' => $order->customer_ip_address, + 'customer_ip_address' => $order->get_customer_ip_address(), 'customer_user_agent' => $order->get_user_agent(), 'created_via' => $order->created_via, 'customer_note' => $order->get_customer_note(), diff --git a/includes/api/legacy/v1/class-wc-api-orders.php b/includes/api/legacy/v1/class-wc-api-orders.php index fabdf1ee814..4e5aabda68d 100644 --- a/includes/api/legacy/v1/class-wc-api-orders.php +++ b/includes/api/legacy/v1/class-wc-api-orders.php @@ -161,8 +161,8 @@ class WC_API_Orders extends WC_API_Resource { 'postcode' => $order->shipping_postcode, 'country' => $order->shipping_country, ), - 'note' => $order->customer_note, - 'customer_ip' => $order->customer_ip_address, + 'note' => $order->get_customer_note(), + 'customer_ip' => $order->get_customer_ip_address(), 'customer_user_agent' => $order->get_user_agent(), 'customer_id' => $order->get_user_id(), 'view_order_url' => $order->get_view_order_url(), diff --git a/includes/api/legacy/v2/class-wc-api-orders.php b/includes/api/legacy/v2/class-wc-api-orders.php index f854d0f731b..985b65aeefd 100644 --- a/includes/api/legacy/v2/class-wc-api-orders.php +++ b/includes/api/legacy/v2/class-wc-api-orders.php @@ -199,8 +199,8 @@ class WC_API_Orders extends WC_API_Resource { 'postcode' => $order->shipping_postcode, 'country' => $order->shipping_country, ), - 'note' => $order->customer_note, - 'customer_ip' => $order->customer_ip_address, + 'note' => $order->get_customer_note(), + 'customer_ip' => $order->get_customer_ip_address(), 'customer_user_agent' => $order->get_user_agent(), 'customer_id' => $order->get_user_id(), 'view_order_url' => $order->get_view_order_url(), diff --git a/includes/api/legacy/v3/class-wc-api-orders.php b/includes/api/legacy/v3/class-wc-api-orders.php index 2e71a26046d..c6edd246795 100644 --- a/includes/api/legacy/v3/class-wc-api-orders.php +++ b/includes/api/legacy/v3/class-wc-api-orders.php @@ -205,8 +205,8 @@ class WC_API_Orders extends WC_API_Resource { 'postcode' => $order->shipping_postcode, 'country' => $order->shipping_country, ), - 'note' => $order->customer_note, - 'customer_ip' => $order->customer_ip_address, + 'note' => $order->get_customer_note(), + 'customer_ip' => $order->get_customer_ip_address(), 'customer_user_agent' => $order->get_user_agent(), 'customer_id' => $order->get_user_id(), 'view_order_url' => $order->get_view_order_url(), diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php index f07ac5758db..afbed9895a3 100644 --- a/includes/class-wc-emails.php +++ b/includes/class-wc-emails.php @@ -451,10 +451,10 @@ class WC_Emails { public function customer_details( $order, $sent_to_admin = false, $plain_text = false ) { $fields = array(); - if ( $order->customer_note ) { + if ( $order->get_customer_note() ) { $fields['customer_note'] = array( 'label' => __( 'Note', 'woocommerce' ), - 'value' => wptexturize( $order->customer_note ) + 'value' => wptexturize( $order->get_customer_note() ) ); } diff --git a/includes/cli/class-wc-cli-order.php b/includes/cli/class-wc-cli-order.php index d7f90daf53b..c76b3503aa2 100644 --- a/includes/cli/class-wc-cli-order.php +++ b/includes/cli/class-wc-cli-order.php @@ -674,8 +674,8 @@ class WC_CLI_Order extends WC_CLI_Command { 'postcode' => $order->shipping_postcode, 'country' => $order->shipping_country, ), - 'note' => $order->customer_note, - 'customer_ip' => $order->customer_ip_address, + 'note' => $order->get_customer_note(), + 'customer_ip' => $order->get_customer_ip_address(), 'customer_user_agent' => $order->get_user_agent(), 'customer_id' => $order->get_user_id(), 'view_order_url' => $order->get_view_order_url(),