Created
June 25, 2018 16:20
-
-
Save FernandoSalinas33/e2103011dedf1de7ce7e5580deffa232 to your computer and use it in GitHub Desktop.
Vendors Auto Approve
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Plugin Name: Product Vendors, auto approve | |
*/ | |
function automaticallyApproveRegisteredVendors ( $vendorData ) { | |
$vendorData['role'] = 'wc_product_vendors_admin_vendor'; | |
return $vendorData; | |
} | |
add_filter( 'wcpv_registration_default_user_data', | |
'automaticallyApproveRegisteredVendors', 10, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great snippet. Thanks!