diff --git a/includes/class-wc-customer.php b/includes/class-wc-customer.php index cb648fc83da..a8722fcde47 100644 --- a/includes/class-wc-customer.php +++ b/includes/class-wc-customer.php @@ -35,7 +35,7 @@ class WC_Customer extends WC_Legacy_Customer { 'company' => '', 'address_1' => '', 'address_2' => '', - 'city' => '', + 'city' => '', 'postcode' => '', 'country' => '', 'state' => '', @@ -48,7 +48,7 @@ class WC_Customer extends WC_Legacy_Customer { 'company' => '', 'address_1' => '', 'address_2' => '', - 'city' => '', + 'city' => '', 'postcode' => '', 'country' => '', 'state' => '', diff --git a/includes/class-wc-order.php b/includes/class-wc-order.php index e364c84144c..862ceb175c5 100644 --- a/includes/class-wc-order.php +++ b/includes/class-wc-order.php @@ -426,7 +426,7 @@ class WC_Order extends WC_Abstract_Order { */ public function get_base_data() { return array_merge( - array( 'id' => $this->get_id() ), + array( 'id' => $this->get_id() ), $this->data, array( 'number' => $this->get_order_number() ) ); diff --git a/includes/rest-api/Controllers/Version3/class-wc-rest-data-continents-controller.php b/includes/rest-api/Controllers/Version3/class-wc-rest-data-continents-controller.php index 819c290a5c3..4ecdbd7f45d 100644 --- a/includes/rest-api/Controllers/Version3/class-wc-rest-data-continents-controller.php +++ b/includes/rest-api/Controllers/Version3/class-wc-rest-data-continents-controller.php @@ -39,7 +39,9 @@ class WC_REST_Data_Continents_Controller extends WC_REST_Data_Controller { */ public function register_routes() { register_rest_route( - $this->namespace, '/' . $this->rest_base, array( + $this->namespace, + '/' . $this->rest_base, + array( array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_items' ), @@ -49,7 +51,9 @@ class WC_REST_Data_Continents_Controller extends WC_REST_Data_Controller { ) ); register_rest_route( - $this->namespace, '/' . $this->rest_base . '/(?P[\w-]+)', array( + $this->namespace, + '/' . $this->rest_base . '/(?P[\w-]+)', + array( array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_item' ), @@ -104,7 +108,8 @@ class WC_REST_Data_Continents_Controller extends WC_REST_Data_Controller { if ( array_key_exists( $country_code, $locale_info ) ) { // Defensive programming against unexpected changes in locale-info.php. $country_data = wp_parse_args( - $locale_info[ $country_code ], array( + $locale_info[ $country_code ], + array( 'currency_code' => 'USD', 'currency_pos' => 'left', 'decimal_sep' => '.', diff --git a/includes/rest-api/Controllers/Version3/class-wc-rest-data-countries-controller.php b/includes/rest-api/Controllers/Version3/class-wc-rest-data-countries-controller.php index 5f203375270..8900f0aeb66 100644 --- a/includes/rest-api/Controllers/Version3/class-wc-rest-data-countries-controller.php +++ b/includes/rest-api/Controllers/Version3/class-wc-rest-data-countries-controller.php @@ -39,7 +39,9 @@ class WC_REST_Data_Countries_Controller extends WC_REST_Data_Controller { */ public function register_routes() { register_rest_route( - $this->namespace, '/' . $this->rest_base, array( + $this->namespace, + '/' . $this->rest_base, + array( array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_items' ), @@ -49,7 +51,9 @@ class WC_REST_Data_Countries_Controller extends WC_REST_Data_Controller { ) ); register_rest_route( - $this->namespace, '/' . $this->rest_base . '/(?P[\w-]+)', array( + $this->namespace, + '/' . $this->rest_base . '/(?P[\w-]+)', + array( array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_item' ), diff --git a/includes/rest-api/Controllers/Version3/class-wc-rest-data-currencies-controller.php b/includes/rest-api/Controllers/Version3/class-wc-rest-data-currencies-controller.php index 5046c6d4e64..8366debd241 100644 --- a/includes/rest-api/Controllers/Version3/class-wc-rest-data-currencies-controller.php +++ b/includes/rest-api/Controllers/Version3/class-wc-rest-data-currencies-controller.php @@ -36,7 +36,9 @@ class WC_REST_Data_Currencies_Controller extends WC_REST_Data_Controller { */ public function register_routes() { register_rest_route( - $this->namespace, '/' . $this->rest_base, array( + $this->namespace, + '/' . $this->rest_base, + array( array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_items' ), @@ -46,7 +48,9 @@ class WC_REST_Data_Currencies_Controller extends WC_REST_Data_Controller { ) ); register_rest_route( - $this->namespace, '/' . $this->rest_base . '/current', array( + $this->namespace, + '/' . $this->rest_base . '/current', + array( array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_current_item' ), @@ -56,7 +60,9 @@ class WC_REST_Data_Currencies_Controller extends WC_REST_Data_Controller { ) ); register_rest_route( - $this->namespace, '/' . $this->rest_base . '/(?P[\w-]{3})', array( + $this->namespace, + '/' . $this->rest_base . '/(?P[\w-]{3})', + array( array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_item' ),