Allow API Bulk Update without edit_others_products capability
-
Hello!
I am doing a fairly complex development on a Woocommerce site and I need the ability to extend the API to my vendors so they can interact with it, and one thing I noticed is that if the role “vendor” that I use does NOT have the edit_others_products capability, then the /batch API endpoint returns a 403 error “woocommerce_rest_cannot_batch”.
The issue is if I grant this capability to my vendors, then when they get to the admin dashboard, they will be able to see and edit everybody elses products, and I cant allow that.
Is there a way to allow my vendors to use the /batch endpoint WITHOUT allowing them the edit_others_products capability?
(Do keep in mind, I already proofed my endpoints so the vendors cant edit or see others products anyway)
Thank you!
- The topic ‘Allow API Bulk Update without edit_others_products capability’ is closed to new replies.