Fetch products through REST API on the frontend
-
Hi there fellow WordPress Folks!
I’m developing a plugin for a client (a food delivery service) as an WooCommerce extension. I would like to use VueJS as the frontend framework.
So now, is there any way to simply query products / categories through a call to the REST API without authenticating? I mean it’s just for the frontend part of the website. No need for users to login or anything like that and also no need for rights to change data and so on.
Or do I really need to go by wp_localize_script, throw the products into an array and expose it that way to VueJs?
Anyone who has tackled a similar problem?
Thoughts would be very much appreciated.
Thank you!
- The topic ‘Fetch products through REST API on the frontend’ is closed to new replies.