Last active
April 24, 2017 15:58
-
-
Save ucheng/8d34a4f0468fe4b70e1cb3a6da85898c to your computer and use it in GitHub Desktop.
change the default user role for woocommerce register user
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
<?php | |
add_filter( 'woocommerce_new_customer_data', 'my_new_customer_data'); | |
function my_new_customer_data($new_customer_data){ | |
$new_customer_data['role'] = get_option( 'default_role' ); | |
//$new_customer_data['role'] = 'vip'; | |
return $new_customer_data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment