• Resolved Deea

    (@whereisdeea)


    Hey there,

    Is there any way to allow other users to manage the affiliate program without making them administrators?

    I’d like my shop manager to also manage the affiliate program, but I can’t see a way to do it without assigning her the administrator role.

    Thank you!

Viewing 1 replies (of 1 total)
  • Plugin Author iova.mihai

    (@iovamihai)

    Hey @whereisdeea,

    Thank you for reaching out! Currently, only administrators have access to the affiliates pages in your WordPress admin dashboard.

    However, you can allow shop managers access by adding this following PHP code to your website:

    function slicewp_custom_admin_pages_shop_manager_capability( $capability ) {
    	
    	if ( current_user_can( 'shop_manager' ) )
    		$capability = 'shop_manager';
    	
    	return $capability;
    	
    }
    add_filter( 'slicewp_menu_page_capability', 'slicewp_custom_admin_pages_shop_manager_capability' );
    add_filter( 'slicewp_submenu_page_capability_dashboard', 'slicewp_custom_admin_pages_shop_manager_capability' );
    add_filter( 'slicewp_submenu_page_capability_affiliates', 'slicewp_custom_admin_pages_shop_manager_capability' );
    add_filter( 'slicewp_submenu_page_capability_commissions', 'slicewp_custom_admin_pages_shop_manager_capability' );
    add_filter( 'slicewp_submenu_page_capability_creatives', 'slicewp_custom_admin_pages_shop_manager_capability' );
    add_filter( 'slicewp_submenu_page_capability_visits', 'slicewp_custom_admin_pages_shop_manager_capability' );
    add_filter( 'slicewp_submenu_page_capability_payouts', 'slicewp_custom_admin_pages_shop_manager_capability' );

    The code hooks into SliceWP and modifies the permissions to allow users that have the shop manager role to access certain admin pages from the plugin. I’ve excluded the plugin’s settings page from being shown to shop managers.

    Please add the code to your website and try it out. If you’re not sure how to add custom code to your website, you can use the Code Snippets plugin (https://ww.wp.xz.cn/plugins/code-snippets/). Please try it out and let me know how it goes.

    Thank you and best wishes,
    Mihai

Viewing 1 replies (of 1 total)

The topic ‘Managing affiliates’ is closed to new replies.