-
-
Save fervous/b47ee7de79bf13455e7875bf240130c0 to your computer and use it in GitHub Desktop.
WC Vendors - Forcing all new registrations to be Vendors ( default ) if my-account registration is used
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
/* 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