Mobile App Refresh Campaign [Banner] 2024

Product Icon

Product Vendors

by  Woo
Turn your store into a multi-vendor marketplace

Fix PHP code that creates new Vendors

WC_Product_Vendors_Registration::register_vendor() is protected. It’s ran by WC_Product_Vendors_Registration::vendor_registration_form_process() for already-registered users. The problem is that I want to be able to run this via my own code, not *only* via Ajax from /wp-admin/edit-tags.php?taxonomy=wcpv_product_vendors&post_type=product

So 2 requested changes:
1) do not *exit* or *wp_send_json()* unless DOING_AJAX
2) allow passing a User ID parameter to vendor_registration_form_process() so I don’t have to filter the result of wp_get_current_user()

Our workaround is to instead have a pre-existing Vendor that we use as the Template and I just have to hard-code that Taxonomy ID and duplicate off that, then update the new one’s data.


Current Status


Last updated: October 31, 2018


Log in to comment on this feature request.