Created
May 26, 2022 06:33
-
-
Save braddalton/486585dc2f768e937601a17728a4b6dd to your computer and use it in GitHub Desktop.
Add Custom Subscriber Customer Capabilities WooCommerce https://wpsites.net/?p=65638
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
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