Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Assign to new WooCommerce registered user another role instead of customer
* Replace 'customer' role (WooCommerce use by default) with your own one.
add_filter('woocommerce_new_customer_data', 'wc_assign_custom_role', 10, 1);
function wc_assign_custom_role($args) {
$args['role'] = 'subscriber';
return $args;

This comment has been minimized.

Show comment Hide comment

garvs May 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment