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

Send MetaData via api #39

Open
begininvoke opened this issue Sep 18, 2020 · 1 comment
Open

Send MetaData via api #39

begininvoke opened this issue Sep 18, 2020 · 1 comment

Comments

@begininvoke
Copy link

hi i can not send url link by api
example :
metadata aded :
_knawatfibu_wcgallary = https://text.com/image.jpg?x-oss-process=image/resize,h_1600,https://text.com/image.jpg?x-oss-process=image/resize,h_1600
after submitting
splitted ',' links for example , it shows incorrectly

image one = https://text.com/image.jpg?x-oss-process=image/resize
image two = h_1600
image three = https://text.com/image.jpg?x-oss-process=image/resize
image four = h_1600
because in the event that :
image one = https://text.com/image.jpg?x-oss-process=image/resize,h_1600

and special thanks for this plugin

@fernandogiacomino
Copy link

fernandogiacomino commented Dec 1, 2021

I was able to update "image-by_url" meta data from WC api, the structure is something like this:

msg.payload= {
"name": $product_name,
"type": "simple",
"sku": $product_sku,
"regular_price": $product_price,
"manage_stock": true,
(...)
"meta_data": [{ "key": "_knawatfibu_url", "value": $image_url1 },
{ "key": "_knawatfibu_wcgallary", "value": [$image_url2, $image_url3, $image_url4]}]
};

"_knawatfibu_url" is the metadata key for featured image, and "_knawatfibu_wcgallary" must be an array of url strings.

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