Woocommerce REST API Crash Introduction

Опубликовано: 12 Март 2025
на канале: Per's Multimedia Design Tutorials
99
3

How to present a Woocommerce product list on any HTML page. And the script you need in order to present your products.

CONTENT
00:00 What is Woocommerce Rest API?
01:46 How to create the costumer key and secret in Woocommerce
02:09 Add the keys to a JavaScript variable
02:44 About Endpoints. We need the /products endpoint
03:27 Use the URL to get a raw JSON blob in the browser
03:59 Inspect the Data in the JSON object via console.log( data )
04:49 About the array with the products
05:40 How to get the src for a product image
06:08 Looping out all data from the data array
06:35 Get the data into the webpage. Create a HTML id for data inject.
07:30 The importance of the += that will append data to what is already there
08:09 How to add a variable to the HTML in the loop, or the ${ data[i].name } trick
09:00 How to display images

SAMPLE CODE ON GITHUB
https://github.com/asathoor/Woocommer...