From 5b953468258ec071ef54be91465c52fc0708aede Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Mon, 3 Mar 2014 21:41:53 -0300 Subject: [PATCH] fixed the customer creation via api --- includes/api/class-wc-api-customers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/api/class-wc-api-customers.php b/includes/api/class-wc-api-customers.php index 61275fec742..ef54c4aec6d 100644 --- a/includes/api/class-wc-api-customers.php +++ b/includes/api/class-wc-api-customers.php @@ -318,7 +318,7 @@ class WC_API_Customers extends WC_API_Resource { // Customer billing address. if ( isset( $data['billing_address'] ) ) { - foreach ( $this->customer_billing_address() as $address ) { + foreach ( $this->get_customer_billing_address() as $address ) { if ( isset( $data['billing_address'][ $address ] ) ) { update_user_meta( $customer_id, 'billing_' . $address, sanitize_text_field( $data['billing_address'][ $address ] ) ); } @@ -327,7 +327,7 @@ class WC_API_Customers extends WC_API_Resource { // Customer shipping address. if ( isset( $data['shipping_address'] ) ) { - foreach ( $this->customer_shipping_address() as $address ) { + foreach ( $this->get_customer_shipping_address() as $address ) { if ( isset( $data['shipping_address'][ $address ] ) ) { update_user_meta( $customer_id, 'shipping_' . $address, sanitize_text_field( $data['shipping_address'][ $address ] ) ); }