Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Steve Burge

    (@stevejburge)

    Hi @bb3cpo

    Thanks for using PublishPress Capabilities.

    I tried this on two test sites and our plugin worked smoothly with this PDF Invoices plugin.

    We’d need more info to track this one down.

    Thread Starter bb3cpo

    (@bb3cpo)

    Thanks for your reply.

    The problem on my side occurs only for users whose role is not “Administrator”, eg. it is “Shop Manager” or a custom role that I made.

    When a user has a role anything other than “Administrator” then the root navigation menu of the plugin WooCommerce PDF Invoices doesn’t show.

    Plugin Author Steve Burge

    (@stevejburge)

    Hi @bb3cpo. That sounds like normal behavior: many plugins only show themselves to Administrators. Maybe the developer of this plugin can provide a capability so other user roles can access it.

    The Pro version of Capabilities also has workaround for situations like this.

    Thread Starter bb3cpo

    (@bb3cpo)

    Thanks, I contacted the developer of the other plugin for a solution.

    Plugin Author Steve Burge

    (@stevejburge)

    Thanks. If they have a capability available, you can add it this way: https://publishpress.com/knowledge-base/add-new-permissions/

    Thread Starter bb3cpo

    (@bb3cpo)

    A solution was provided by the devs of WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Labels.

    For anyone interested, in case you have disabled the capability manage_woocommerce but you need to let your users print invoices with the above mentioned plugin, you can do it by adding the following code to your functions.php:

    
    add_filter('wf_pklist_alter_admin_print_role_access','wt_pklist_add_print_role');
    function wt_pklist_add_print_role($role_arr)
    {
    $role_arr[]='shop_manager'; //add custom roles here
    return $role_arr;
    }
    
    • This reply was modified 3 years, 9 months ago by bb3cpo.
    Plugin Author Steve Burge

    (@stevejburge)

    Thanks for reporting back @bb3cpo

    It looks like this is the key capability: wf_pklist_alter_admin_print_role_access

    If you don’t want to use code, you could also that capability to users via the UI: https://publishpress.com/knowledge-base/add-new-permissions/

    Thread Starter bb3cpo

    (@bb3cpo)

    Hello.

    Adding the capability you provided doesn’t work.

    Using the code in the function works.

    Thanks.

    Plugin Author Kevin Behrens

    (@kevinb)

    @bb3cpo @stevejburge Actually, you need to use the code snippet. wf_pklist_alter_admin_print_role_access is not a new capability, but the name of a filter that the plugin supports for specifying role names.

    Paste the code snippet into the functions.php file of your active them, but change or duplicate the “$role_arr []=” line with the name of your role(s) which should have the access:

    add_filter('wf_pklist_alter_admin_print_role_access','wt_pklist_add_print_role');
    function wt_pklist_add_print_role($role_arr)
    {
       $role_arr[] = 'shop_manager'; //add custom roles here
       $role_arr[] = 'custom_editor';
       $role_arr[] = 'another_role_name';
       return $role_arr;
    }
    • This reply was modified 3 years, 9 months ago by Kevin Behrens.
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Compatibility with WebToffee’s PDF Invoices plugin’ is closed to new replies.