Skip to content

Instantly share code, notes, and snippets.

@alexwcoleman
Created September 14, 2017 21:02
Show Gist options
  • Save alexwcoleman/49593bf2c601ab5ecc2c320f6947bf95 to your computer and use it in GitHub Desktop.
Save alexwcoleman/49593bf2c601ab5ecc2c320f6947bf95 to your computer and use it in GitHub Desktop.
Remove WooCommerce Roles (or any other WordPress roles)
// this runs on init. Just add or remove whatever user role you want to delete.
function awc_remove_role() {
remove_role( 'customer' );
remove_role( 'shop_manager' );
}
add_action( 'init', 'awc_remove_role' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment