Note: The code below is for the premium version of the plugin.

Per default, only site admins can change plugin settings. If you want other WordPress roles, such as editors, to be able to change the plugin’s settings, paste the following PHP code at the bottom of your functions.php file:

add_filter('shoppable_images_capability', function($capability) {
   return 'edit_posts';
});

add_filter( 'option_page_capability_mabel-shoppable-images', 'si_setting_capability' );
function si_setting_capability( $capability ) {
   return 'edit_posts';
}

Note: in the code above, we’re returning edit_posts as the minimum capability a user needs in order to edit the plugin’s settings. You can find all possible capabilities here on WordPress.org.

If you’d like to create a completely new role which will only be able to edit the plugin settings, paste this PHP code at the bottom of your functions.php file. The role in this example is called “Shoppable Images Manager”.

add_filter('shoppable_images_capability', function($capability) {
   if(current_user_can('manage_options'))
      return 'manage_options'; // To allow admins to also edit the hours.
   return 'manage_shoppable_images';
});
 
remove_role('manage_shoppable_images');
add_role('manage_shoppable_images','Shoppable Images Manager', array(
   'read' => true,
   'edit_posts' => true,
   'manage_shoppable_images' => true,
));
 
add_filter('option_page_capability_mabel-shoppable-images','set_si_options_capability');
function set_si_options_capability($capa){
    if(current_user_can('manage_options'))
        return $capa;
    return 'manage_shoppable_images';
}