Skip to content

Instantly share code, notes, and snippets.

@fervous
Forked from bentasm1/functions.php
Last active May 17, 2017
Embed
What would you like to do?
WC Vendors - Forcing all new registrations to be Vendors ( default ) if my-account registration is used
/* By default Registrations to your site using the My Account = Vendor role, rather than the Customer role */
add_filter( 'woocommerce_new_customer_data', 'custom_woocommerce_new_customer_data' );
function custom_woocommerce_new_customer_data( $data ){
$data['role'] = 'vendor'; // the new default role
return $data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment