featured-image-by-url
featured-image-by-url copied to clipboard
Not working with Rest Api
I cannot use with rest api
Hello @zhdishaq,
Thanks for report issue. Yes its not working with REST API yet. we will add support for it soon..
Thanks, Dharmesh
Insert Product with variation : Works well with REST API - version 'wc/v2' using class-wc-api-client.php
Using - $woocommerce->products->create($data); https://github.com/helpforfitness/WooCommerce-REST-API-Client-Library-v2
Above library doesn't support "create categories" which you need to call separately using rest API V3 Library -
$woocommerce->post('products/categories', $cdata);
Hope above information will help somebody. Try to figure out how to insert URL for categories using featured-image-by-url.
Have a nice day!
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, (...) "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.