Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] Get Customer has totally different attributes then before #22

Open
NicoJuicy opened this issue Aug 12, 2019 · 2 comments
Labels

Comments

@NicoJuicy
Copy link

@NicoJuicy NicoJuicy commented Aug 12, 2019

Endpoint : https://shop/wp-json/wc/v4/customers?search=first_name

I receive the following model:

[  
{  
  "id":x,
  "user_id":1,
  "username":"NicoJuicy",
  "name":"Nico Sap",
  "email":"email",
  "country":"BE",
  "city":"some-villa",
  "state":"",
  "postcode":"number-zipcode",
  "date_registered":"2016-05-31T00:45:02",
  "date_last_active":"-0001-11-30T00:00:00",
  "orders_count":2,
  "total_spend":0,
  "avg_order_value":0,
  "date_last_order":"2017-12-05 22:09:15",
  "date_registered_gmt":"2016-05-30T23:45:02",
  "date_last_active_gmt":"-0001-11-30T00:00:00",
  "_links":{  
     "customer":[  
        {  
           "href":"https:\/\/www.shop\/wp-json\/wc\/v4\/customers\/1"
        }
     ]
  }
}]

Which is extremely weird. I also can't navigate to /wp-json/wc/v4/customers/1

v2 end v3 endpoints give the expected model ( with first_name and last_name).

I'm on version 3.7 and wanted to use v4 endpoint, because i had results when searching for a "guest" name.

I didn't have that match on v2/v3.

Is it possible to advise me on what endpoint i should lookup a guest account based on first_name and last_name?

Use-case: looking up orders based on first_name, last_name and email, when a client sends me an email ( can be from another mail).

@issue-label-bot

This comment has been minimized.

Copy link

@issue-label-bot issue-label-bot bot commented Aug 12, 2019

Issue-Label Bot is automatically applying the label type: bug to this issue, with a confidence of 0.85. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@rrennick

This comment has been minimized.

Copy link
Collaborator

@rrennick rrennick commented Aug 13, 2019

@NicoJuicy Thanks for reporting this. Based on some testing this looks like it's an issue with the WooCommerce Admin plugin. I created woocommerce/woocommerce-admin#2781.

Do you have the woocommerce-rest-api plugin installed and active?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.