FunnelKit
FunnelKit Documentation
Get unstuck with our helpful reference material

Funnel Builder

Allow FunnelKit Funnels Menu Access for Specific User Role

In this documentation, we will explain how to grant access to FunnelKit menus for a specific user role.

Note: In this process, users will gain access only to the FunnelKit menu, not to any other plugins.

Here are the steps you need to follow:

Add the following code snippet to grant users access to the FunnelKit menu:

Step 1: Add the Code Snippet

Add the following code snippet to grant users access to the FunnelKit menu: 

Note: You can add this snippet using a plugin like “Code Snippets” to avoid directly editing theme or plugin files. To learn the process, refer to our doc on “how to add a custom snippet to WordPress”.

add code and activate

Here is the code snippet:

add_filter( 'wffn_user_access_capabilities', 'wffn_funnel_user_capabilities', 10, 1 );//funnel capabilities
add_filter( 'wfacp_user_access_capabilities', 'wffn_funnel_user_capabilities', 10, 1 );//checkout capabilities
add_filter( 'wfocu_user_access_capabilities', 'wffn_funnel_user_capabilities', 10, 1 );//upsell capabilities
add_filter( 'wfob_user_access_capabilities', 'wffn_funnel_user_capabilities', 10, 1 );//bump capabilities
add_filter( 'bwfabt_user_access_capabilities', 'wffn_funnel_user_capabilities', 10, 1 );//experiment capabilities

function wffn_funnel_user_capabilities( $config ) {
	if ( is_array( $config ) ) {
		/*
		*change 'shop manager' which role for open funnel
		* 'read' permission means only show funnel for user
		* 'write' permision means user have full access for add edit delete funnel
		*/
		$config['shop_manager'] = array(
			'funnel'    => array( 'read', 'write' ),
			'menu'      => array( 'read', 'write' ),
			'analytics' => array( 'read', 'write' ),
			'checkout'  => array( 'read', 'write' ),
			'bump'      => array( 'read', 'write' ),
		);
	}
	return $config;
}

Step 2: Make necessary changes to the code snippet 

You can allow access to the FunnelKit menu to any type of user.  For this, all you need to do is replace “shop_manager” with any user role here. 

By default, WordPress allows you to create different user roles, such as Shop Manager, Customer, Subscriber, Contributor, Author, Editor, and Administrator. 

WordPress users type

Just replace it with shop_manager. 

add code to allow Funnels menu access for specific user role

Here are the values you need to use: 

User RoleReplace shop_manager with 
Contributorcontributor
Authorauthor
EditorEditor
Administratoradministrator

Note: The Administrator will have access to the FunnelKit menu by default. So you can skip that. 

The Funnels menu will now be accessible to the specified user role.

Step 3: Test the process 

Now, log in to the account to which you want to give access to the FunnelKit menu, and you should see the menu with other available options. 

preview of allow Funnels menu access for specific user role
Ready to Transform Your Store?
Join 39,415+ successful store owners who trust FunnelKit to power their businesses.
Conversion Optimized Checkout Pages
Increase Revenue with Smart Upsells
Capture Emails & Recover Abandoned Carts
Automate Winbacks & Repeat Sales
948+ 5 star reviews on WordPress.org
Transform your store to power your business with FunnelKit
🚀 Maximize Your Profit with FunnelKit – Highest Rated with 948+ 5-Star Reviews
Get Started