Skip to content

Instantly share code, notes, and snippets.

@FernandoSalinas33
Created May 2, 2018 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FernandoSalinas33/d2169955ee384a58ef18fc20f29e7424 to your computer and use it in GitHub Desktop.
Save FernandoSalinas33/d2169955ee384a58ef18fc20f29e7424 to your computer and use it in GitHub Desktop.
Change WooCommerce Registration Role to Employer.
add_filter('woocommerce_new_customer_data', 'wc_assign_custom_role', 10, 1);
function wc_assign_custom_role($args) {
$args['role'] = 'employer';
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment