XiaoFaye / WooCommerce.NET

A .NET Wrapper for WooCommerce/WordPress REST API
MIT License
391 stars 219 forks source link

Get seller information #45

Closed hansgunnar closed 7 years ago

hansgunnar commented 7 years ago

Hi,

We're using Dokan multivendor shops. Is there a way to read who the seller of a product is through your wrapper? Or who the seller in an order is?

If there are currently no way of doing that, I hope you would consider putting that into your API. Excellent work by the way!

Thanks!

XiaoFaye commented 7 years ago

Vendor/Seller information can be stored in the WP database in many ways. One of the approach is post_mate. In the WC REST API, there is a filter parameter that you can use when getting products, the official docs says "Use WP Query arguments to modify the response; private query vars require appropriate authorization.". If you are familiar with WP Query, this seems like a way to do it, but there is no sample code anywhere, you will need to spend some time to see if it's working.

hansgunnar commented 7 years ago

Unfortunately, I'm not familiar with php, I need to to this using C#. Is it possible to execute WP_queries using C#? Any example?

XiaoFaye commented 7 years ago

In that case, I can only suggest you to query the Wordpress database directly using MySQL Connector.

hansgunnar commented 7 years ago

Ok thank you for your time.