Last active
August 29, 2015 14:19
-
-
Save zstepek/2f18ba2de3e5bf197e81 to your computer and use it in GitHub Desktop.
Add the ability to view Gravity Forms entries to the Shop Manager role in WooCommerce
This file contains hidden or 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
<?php | |
// Add gravity forms support for shop managers. | |
function mindsize_gravity_forms_shop_manager_role(){ | |
$role = get_role('shop_manager'); | |
// remove full access in case it was added previously | |
$role->remove_cap('gform_full_access'); | |
$role->add_cap('gravityforms_view_entries'); | |
$role->add_cap('gravityforms_edit_entries'); | |
} | |
add_action('admin_init','mindsize_gravity_forms_shop_manager_role'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment