woocommerce offtopic – What’s the best way and location to add php script API
Question
I have WordPress with WooCommerce plugin website, I want to add prodcuts that reterived from API data comes in JSon like this: and the page that I want to add the procuts in in the main menu.
So I want to how add the prodcuts to the page through the code which comes in json to the woocommerce plugin in a specific page.
Thanks.
kind of data
{
"type": "Garment",
"name": "Sweatshirts",
"products": [
{
"name": "Gildan Sweatshirt - Crew",
"style": "18000",
"image": {
"url": "http://www.ooshirts.com/products/5/catalog.jpg",
"label": "Catalog"
},
"id": "gildan-sweatshirt-crew",
"url": "https://api.scalablepress.com/v2/products/gildan-sweatshirt-crew"
},
{
"name": "Gildan Heavy Sweatshirt",
"style": "12000",
"image": {
"url": "http://www.ooshirts.com/products/6/catalog.jpg",
"label": "Catalog"
},
"id": "gildan-heavy-sweatshirt",
"url": "https://api.scalablepress.com/v2/products/gildan-heavy-sweatshirt"
}
],
"family": "Unisex",
"url": "https://api.scalablepress.com/v2/categories/sweatshirts",
"categoryId": "sweatshirts"
}
0
5 months
2022-09-05T12:11:20-05:00
2022-09-05T12:11:20-05:00 0 Answers
0 views
0
Leave an answer