woocommerce-android icon indicating copy to clipboard operation
woocommerce-android copied to clipboard

[Order creation] We show billing address instead of shipping

Open kidinov opened this issue 9 months ago • 2 comments

  • Start order creation
  • Add a new customer, with both billing and shipping address
  • Create an order
  • Start a new order creation
  • Assign newly created customer to an order
  • Notice that both addresses are billing address

Also, after order is created both Android and iOS don't show addresses properly but in different way, but both missing shipping address

At least the first part of the problem comes that we use analytics API to search customers that don't return 2 addresses:

curl -v -X GET 'https://public-api.wordpress.com/rest/v1.1/jetpack-blogs/198349371/rest-api/?path=%2Fwc-analytics%2Freports%2Fcustomers%2F%26_method%3Dget&json=true&query=%7B%22per_page%22%3A%2230%22%2C%22orderby%22%3A%22name%22%2C%22order%22%3A%22asc%22%2C%22page%22%3A%221%22%2C%22search%22%3A%22billin%22%2C%22searchby%22%3A%22all%22%2C%22filter_empty%22%3A%22email%22%7D&locale=en_US' ...
{"data":[{"id":11610,"user_id":0,"username":"","name":"Billing name Billing last","email":"[email protected]","country":"AS","city":"Billing citiy","state":"","postcode":"11111","date_registered":null,"date_last_active":"2025-01-15T08:59:22","date_last_order":null,"orders_count":0,"total_spend":0,"avg_order_value":0,"date_registered_gmt":null,"date_last_active_gmt":"2025-01-15T11:59:22"}]}

Android used to use another API, I believe that was https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-customers but there were other issues with that, but I don't remember which one

kidinov avatar Jan 15 '25 09:01 kidinov