• Resolved mattnyy

    (@mattnyy)


    Is there any way you can hide the Billing/Invoice [Send New Invoice] Button for regular users logged in. That only admins can see it?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Hello.

    There is an option to completely hide WP-Invoice plugin from some roles in Settings/Main tab – Minimum user level to manage WP-Invoice.

    Other options to hide functionality we do not have.We do provide custom consulting and development for our plugins, if you are interested, feel free to contact us – https://www.usabilitydynamics.com/contact-us

    Regards.

    Thread Starter mattnyy

    (@mattnyy)

    So just to be sure the area circles in this image cannot be made to be seen by admins only? Unless I get some custom coding?

    https://veteranpoolcare.com/imagesTEST/Untitled.png

    • This reply was modified 7 years, 4 months ago by mattnyy. Reason: link did not show
    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    at the moment there is no ability, but you shouldn’t see that button when you set up Administrator as Minimum user level to manage WP-Invoice. We will try to fix that in the next release of WP-Invoice.

    Thread Starter mattnyy

    (@mattnyy)

    I don’t know if this is just a quick hack or something you can use on your end for the update. But I got some help and implemented this……

    Find in /wp-content/plugins/wp-invoice/lib/ui/profile_page_content.php

    <table class="form-table" ><tr>
    
          <th><h3><?php _e('Billing / Invoicing Info', ud_get_wp_invoice()->domain) ?></h3></th>
    
          <td>
    
    		<input type="button" onclick="window.location.href='<?php echo $wpi_settings['links']['manage_invoice'].$email; ?>'" class="button" value="<?php echo  __('Send New Invoice', ud_get_wp_invoice()->domain) ?>" id="crm_new_invioce"/>
    
          </td>
    
        </tr>
    
    </table>

    Edit

    1. Add this before the <table> tag:

    <?php if ( current_user_can('administrator') ) : ?>

    2. Add this after the </table> tag:

    <?php endif; ?>

    After all said and done only the admin can see that Send New Invoice Button.

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Thank you for your notes.

    Regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Question on what user sees on profile.’ is closed to new replies.