Let shop manager add/edit field groups

Per default, only administrators can add or edit field groups via WooCommerce > Product Fields. WooCommerce has a special role called “shop manager”, which allows a user to change everything regarding the shop (edit products, save settings, etc..). You can instruct our plugin to also allow shop managers to edit field groups too. Add the following code to your site:

add_filter( 'wapf/setting/capability', function( $capabilities ) { 
    return 'manage_woocommerce'; 
} );Code language: PHP (php)

Was this article helpful?

Related Articles