In order to allow a specific role to download invoices, simply add the following action to your themes functions.php
function bewpi_allowed_roles_to_download_invoice($allowed_roles) { // available roles: shop_manager, customer, contributor, author, editor, administrator $allowed_roles[] = "editor"; // end so on.. return $allowed_roles; } add_filter( 'bewpi_allowed_roles_to_download_invoice', 'bewpi_allowed_roles_to_download_invoice', 10, 2 );
By default the roles of shop manager and administrators are allowed to download invoices.