Skip to content

Instantly share code, notes, and snippets.

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 braddalton/486585dc2f768e937601a17728a4b6dd to your computer and use it in GitHub Desktop.
Save braddalton/486585dc2f768e937601a17728a4b6dd to your computer and use it in GitHub Desktop.
Add Custom Subscriber Customer Capabilities WooCommerce https://wpsites.net/?p=65638
add_action( 'admin_init', 'add_subscriber_capabilities');
function add_subscriber_capabilities() {
$role = get_role( 'subscriber' );
$role->add_cap( 'edit_posts' );
$role->add_cap( 'edit_published_posts' );
$role->add_cap( 'publish_posts' );
$role->add_cap( 'delete_posts' );
$role->add_cap( 'delete_published_posts' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment