• Resolved hovenberg

    (@hovenberg)


    Hi,

    How can I allow the plugin to be used by author role in WordPress?

    Following code worked for me, that authors were able to create/delete feeds and manage the settings however, they could not edit the feeds.
    Which permission/capability should be granted to them?

    I don’t want to give them the manage_options capability because that would be too much.

    add_menu_page(__( 'Product Feed PRO for WooCommerce', 'woo-product-feed-pro' ), __( 'Product Feed Pro','woo-product-feed-pro' ), apply_filters( 'woosea_user_cap', 'edit_posts' ), __FILE__, 'woosea_generate_pages', esc_url( WOOCOMMERCESEA_PLUGIN_URL . '/images/icon-16x16.png'),99);
    		add_submenu_page(__FILE__, __( 'Feed configuration', 'woo-product-feed-pro' ), __( 'Create feed', 'woo-product-feed-pro' ), apply_filters( 'woosea_user_cap', 'edit_posts' ), __FILE__, 'woosea_generate_pages');
    		add_submenu_page(__FILE__, __( 'Manage feeds', 'woo-product-feed-pro' ), __( 'Manage feeds', 'woo-product-feed-pro' ), apply_filters( 'woosea_user_cap', 'edit_posts' ), 'woosea_manage_feed', 'woosea_manage_feed');
    		add_submenu_page(__FILE__, __( 'Settings', 'woo-product-feed-pro' ), __( 'Settings', 'woo-product-feed-pro' ), apply_filters( 'woosea_user_cap', 'edit_posts' ), 'woosea_manage_settings', 'woosea_manage_settings');
    • This topic was modified 2 years, 11 months ago by hovenberg.
    • This topic was modified 2 years, 11 months ago by hovenberg.
    • This topic was modified 2 years, 11 months ago by hovenberg.
    • This topic was modified 2 years, 11 months ago by hovenberg.
Viewing 1 replies (of 1 total)
  • Thread Starter hovenberg

    (@hovenberg)

    For anyone coming accros this:

    Adding ‘author’ to all arrays where the plugin checks for user role which is set to ‘administrator’ only in most cases, solved it.

Viewing 1 replies (of 1 total)
  • The topic ‘Make plugin useable by authors’ is closed to new replies.