WooCommerce Api - Only expose GET /products and POST /order

Viewed 155

A few years ago I did some stuff with the WooCommerce API. Now I want to build a really small webshop with only a few items to buy and without user management. I thought of WooCommerce because of the great API that I would combine with Next.js.

Because it is really small scale I want to build a webshop without the possibility for users to create an accout. They just fill a shopping cart, go to the check-out area, provide their personal information and do the payment.

I have WordPress and WooCommerce all set up en the API (V3) is working. The only thing I can't wrap my head around is how to only expose 'some' API routes to public visitors. It goes without saying that I don't want to expose: get customers, get orders... A visitor should only be able to see products and buy products. The rest of the store management will be done via WordPress itself.

Anyone there to help me?

0 Answers
Related