StockPack settings capability filter

If you are looking to restrict the users that are allowed to edit StockPack settings, you can update the capability for which the settings page will be loaded.

Here’s a sample code that restricts the StockPack settings page to only users that are allowed to upload files.


add_filter( 'stockpack_settings_capability', 'stockpack_settings' );

function stockpack_settings( $capability ) {
   return 'upload_files';

If you have any questions, feel free to contact us via

Leave a Comment