Last active
May 17, 2017 01:46
-
-
Save bentasm1/22ec814d568fa183840d to your computer and use it in GitHub Desktop.
WC Vendors - Forcing all new registrations to be Vendors
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
/* Forces all new registrations to your site on the My Account page to be a Vendor, 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