woocommerce / woocommerce-rest-api

This is the WooCommerce core REST API Package. It runs standalone as a feature plugin too.
70 stars 46 forks source link

WP Multisite returns 'customer already exists' on creation but gives 'false' when we fire a GET for this user #251

Open yulumadavid opened 3 years ago

yulumadavid commented 3 years ago

Situation: We've got this WP Multisite with both sites Woo enabled.

A specific customer is active on Site 1 and Site 2. But when we do the following we receive an unexpected answer.

What we do POST with endpoint customers with the e-mail address of the already excisting customer. We receive an error from the API registration-error-email-exists

We've got this covered because it happens more often. So now we fire a GET to the endpoint customers with the exact same e-mail address. Now we receive a 'false'

!?!? confused ;-)

What we try to do When an e-mail address already exists we try to GET the customer to retrieve the id so we can match it and update it with the right id.