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

Remove read-only from customer role in REST API #52

Closed
amirvenus opened this issue Oct 15, 2019 · 2 comments
Closed

Remove read-only from customer role in REST API #52

amirvenus opened this issue Oct 15, 2019 · 2 comments

Comments

@amirvenus
Copy link

Is your feature request related to a problem? Please describe.
I'm always frustrated when I have to create a customer using the REST API and then having to change its role as the WC one is read-only.

Describe the solution you'd like
Remove read-only from Customer-> role in the REST API

Describe alternatives you've considered
For now, I have to either modify the database to change the customer's role or use the Wordpress's API to do so.

Alternatively, the role can be changed using the WC Admin page and I wonder why it's read-only on the API!

@claudiosanches claudiosanches transferred this issue from woocommerce/woocommerce Oct 16, 2019
@issue-label-bot
Copy link

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

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

@claudiosanches
Copy link
Contributor

For now, I have to either modify the database to change the customer's role or use the Wordpress's API to do so.

Those aren't the only options, there's filters to enable it.
You can find all functions and filters to change it in:

https://github.com/woocommerce/woocommerce/blob/81360d682764658c9fa5e79c795b0cb4ccf93967/includes/wc-rest-functions.php#L214-L353

Closing because for now we don't plan to open the REST API for everyone, since this may cause security problems for some people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants