better-rest-endpoints icon indicating copy to clipboard operation
better-rest-endpoints copied to clipboard

WooCommerce support?

Open joshuaiz opened this issue 7 years ago • 4 comments

First, this plugin is totally incredible and is already making things much easier.

Having a look at all the endpoints, there are some for products. Does this support WooCommerce out of the box? There wasn't anything in the docs about WC.

All I can say is thanks...this is like the coolest thing ever. I can't believe more people aren't using it.

joshuaiz avatar Jul 30 '18 21:07 joshuaiz

Awesome thanks @joshuaiz. WC support should work but I need to sort out what the endpoints would actually look like. Because all WP post objects are part of the API, they should be part of this too.

mattada avatar Jul 31 '18 04:07 mattada

Just tested /better-rest-endpoints/v1/product in Postman and it returns all the default BRE post data but not WooCommerce-related product data like price, downloadable, download url, etc. Those are kind of important :)

A couple issues: WooCommerce requires authentication for certain endpoints, especially with creating/editing products. Another issue is the shopping cart is not made visible to the api so I've been using this as a bridge: https://github.com/seb86/cart-rest-api-for-woocommerce

But to have that built-in to BRE would be amazing.

joshuaiz avatar Jul 31 '18 05:07 joshuaiz

Just an update on this from my end. As the only dev working on this project, and no longer working full time in the WordPress space, I don't see myself getting to this any time soon. I would absolutely be open to anyone spearheading this feature and adding it in. Not saying I won't ever but might be faster if someone else jumped in.

erwstout avatar Aug 22 '18 01:08 erwstout

No worries. I've been using the regular WC REST API calls and they seem to be suitable. Different calls for different endpoints are not that big of an issue for me. I'd love to say I have tons of time and could jump in on this...maybe in a month or two.

joshuaiz avatar Aug 22 '18 03:08 joshuaiz