Create or update from API
-
hello can I create or update variation gallery from API ? If possible, is there any documentation ?
Thankyou in advance.
Viewing 4 replies - 1 through 4 (of 4 total)
-
Hello thank you for your response, I have tried the variation gallery, using the id of the photo, for an example like this:
{ "description": "", "permalink": "https://domain.com/shop-all/shop-all/tops/katniss-satin-shirt-pink/?attribute_pa_size=l", "sku": "SR.00164", "price": "269000", "regular_price": "269000", "sale_price": "", "date_on_sale_from": null, "date_on_sale_from_gmt": null, "date_on_sale_to": null, "date_on_sale_to_gmt": null, "on_sale": false, "status": "publish", "purchasable": true, "virtual": false, "downloadable": false, "downloads": [], "download_limit": -1, "download_expiry": -1, "tax_status": "taxable", "tax_class": "", "manage_stock": true, "stock_quantity": 0, "stock_status": "outofstock", "backorders": "no", "backorders_allowed": false, "backordered": false, "weight": "0.35", "dimensions": { "length": "", "width": "", "height": "" }, "shipping_class": "", "shipping_class_id": 0, "image": { "id": 109965, "date_created": "2019-06-21T16:54:15", "date_created_gmt": "2019-06-21T02:54:15", "date_modified": "2019-06-21T16:54:15", "date_modified_gmt": "2019-06-21T02:54:15", "src": "https://domain.com/wp-content/uploads/2019/06/KATNISS-SATIN-SHIRT-DUSTY-PINK-COVER.jpg", "name": "KATNISS SATIN SHIRT DUSTY PINK – COVER", "alt": "" }, "attributes": [ { "id": 4, "name": "SIZE", "option": "XL" } ], "menu_order": 1, "meta_data": [ { "id": 3401174, "key": "_vc_post_settings", "value": { "vc_grid_id": [] } }, { "id": 3401175, "key": "fb_product_description", "value": "" }, { "id": 3401176, "key": "fb_visibility", "value": "1" }, { "id": 3401177, "key": "_yith_wcwtl_users_list", "value": [ "[email protected]" ] }, { "id": 3420882, "key": "fb_product_item_id", "value": "2979260935425271" }, { "id": 5025046, "key": "mwb_wpr_variable_points", "value": "8" } ], "woo_variation_gallery_images": [ { "id": 390857, "date_created": "2021-05-20T20:38:03", "date_created_gmt": "2021-05-20T06:38:03", "date_modified": "2021-05-20T20:38:03", "date_modified_gmt": "2021-05-20T06:38:03", "src": "https://domain.com/wp-content/uploads/2021/05/ACER-LINEN-DRESS-NUDE-2-1.jpg", "name": "ACER LINEN DRESS NUDE 2", "alt": "" }, { "id": 390859, "date_created": "2021-05-20T20:38:03", "date_created_gmt": "2021-05-20T06:38:03", "date_modified": "2021-05-20T20:38:03", "date_modified_gmt": "2021-05-20T06:38:03", "src": "https://domain.com/wp-content/uploads/2021/05/ACER-LINEN-DRESS-NUDE-4-1.jpg", "name": "ACER LINEN DRESS NUDE 4", "alt": "" } ], "_links": { "self": [ { "href": "https://domain.com/wp-json/wc/v3/products/109467/variations/109468" } ], "collection": [ { "href": "https://domain.com/wp-json/wc/v3/products/109467/variations" } ], "up": [ { "href": "https://domain.com/wp-json/wc/v3/products/109467" } ] } }
but it doesn’t work, thank you in advance.
regards,
Rian Rhello, sorry I thought this was a variation gallery plugin, it turns out that the author is the same and I just realized, once again sorry and thank you.
regards,
Rian RIn this article, how to use
prepare_object_for_database
and after processing the request how to add image id atwoo_variation_gallery_images
? What is the get function for that? Thx in advance
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Create or update from API’ is closed to new replies.