-
Notifications
You must be signed in to change notification settings - Fork 12
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
Trying to create product in WC REST API v2 #23
Comments
The v2 REST API supports metadata out of the box. Please see my notes on the README to see how to use it. |
@judgej could you please help me out? i'm using the rest 'version' => 'wc/v2' and you wrote that it supports custom meta out of the box. but when i'm adding custom meta via the provided example code, i'm getting this error: the array i'm trying to post looks like: when i delete the meta_data entry, everything works fine. product details, like name, description aso. are getting updated, so the code works correctly. thanks for any help and best regards |
@treehighroots did you have any luck resolving this? |
hi @willfaulds. yes, i managed to get it right. i had to setup my json array of data like this:
best regards |
The following code creates a new product, but doesn't create the meta. Would this be expected to work? If so, can you see anything in the code that doesn't look right? Thanks.
WC REST API v2
WC v 3.0.9
The text was updated successfully, but these errors were encountered: