Enhancing Shop Manager's FunnelKit Access

Заказчик: AI | Опубликовано: 06.11.2025
Бюджет: 250 $

Need: Give Shop Managers access to FunnelKit Automations without granting manage_options I’m using FunnelKit Automations (Autonami) with WooCommerce / WordPress. I need the Shop Manager role to access the Automations area, but they currently see the error: (“Sorry, you don’t have permission to do that.”) FunnelKit’s developer gave me this snippet, but it doesn’t solve it: <?php add_filter( 'bwfan_crm_api_access_caps', function () { $capabilites[] = 'manage_woocommerce'; $capabilites[] = 'edit_posts'; return $capabilites; } ); add_filter( 'bwfan_menu_access_caps', function ( $capability, $modified_caps ) { if ( in_array( 'edit_posts', $modified_caps, true ) ) { $capability = 'edit_posts'; } return $capability; }, 10, 2 ); I could make it work by granting manage_options, but that unlocks too many admin features, which I don’t want. What I want A code-only solution (to be added via the WPCode plugin) that: Lets Shop Managers (or users with manage_woocommerce) fully use FunnelKit Automations (menus, pages, AJAX/REST actions). Does not grant broad capabilities like manage_options outside of FunnelKit Automations. Works with the current FunnelKit version and is safe/upgrade-proof.