Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM Marketplace – REST API › Please how can i create a vendor, from a rest API
- December 23, 2019 at 11:44 am #98654
Please, how can I create a vendor, from a rest API? The default WordPress user registers customer. and I need this to be able to create vendor directly from a rest API but I cannot seem to find any resources to help out.
- December 28, 2019 at 11:27 am #99668
WCFM rest api doesn’t have any route of itself to create users or even vendors you must use the default wordpress user creation route.
You must enter the correct user roles for in the api data for creating different user roles other than customers.
- December 28, 2019 at 11:53 am #99693
For your convenience the user role for vendors is wcfm_vendor
- January 27, 2020 at 5:28 pm #104190
We already have an app to create products using the Woocommerce REST API. I was wondering if I could assign this product to a particular vendor when creating the product through the API. If possible, could you please explain how I can achieve this?
- January 29, 2020 at 11:24 am #104477
If you create a product through WCFM Rest api the product will automatically get assigned to the vendor already logged in.
But if you are using Woocommerce rest api you need to set the user id of the vendor and pass it as the author of the product to assign the vendor as the vendor of the product.
You must be logged in to reply to this topic.