Support » Plugin: Sliced Invoices - WordPress Invoice Plugin » Override class / functions

  • Resolved WebMat



    Can you help me for override your class in your plugin. With other plugin, this technique works.

    Like this :

    // Remove action plugin sliced
    	function remove_plugin_actions_sliced(){
             global $Sliced_Payments;
             remove_action( 'sliced_invoice_top_bar_left', array( $Sliced_Payments, 'get_gateway_buttons' ) ); 

    (i have licence freelance)

    Thank you in advance,


    • This topic was modified 2 years, 8 months ago by WebMat.
    • This topic was modified 2 years, 8 months ago by WebMat.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author SlicedInvoices


    Hi Mat,

    I’m not sure what you are trying to do with this code. Can you tell me why you want to override the class? There may be easier ways to do whatever it is you are trying to accomplish.

    For example if you just want to hide the top left buttons, you could do that with a few lines of CSS. Or you could make a custom template. But I’m not really sure what your goal here is…

    Also $Sliced_Payments is not a global variable anywhere in Sliced Invoices, so that won’t do anything.


    P.S. by the way, since you have a paid license I’d encourage you to use the support ticket system ( for the fastest response


    because i want to change the php/html code in the header from invoice or quote.

    	public function get_accept_decline_quote_buttons() {
    	       // new line conditionnal 
                   if( has_term( array( 'declined' ), 'quote_status' ) ) {
                        echo '<p class="error-quote">Vous avez refusé le devis.</p>';		
                    // new line conditionnal 	
    		} else if( has_term( array( 'cancelled' ), 'quote_status' ) ) {
    		    echo '<p class="cancel-quote">Le devis a été annulé.</p>';
                    // new line conditionnal 	
    		} else if( has_term( array( 'accepted' ), 'quote_status' ) ) {
    		   echo '<p class="succes-quote">Vous avez accepté le devis, merci pour votre confiance.</p>';
    		} else {


    • This reply was modified 2 years, 8 months ago by WebMat.

    Why ?

    because when you select the option “Create invoice and send to client, but keep quote” the customer like to click 10 times on the “Accept” button from quote because they not understand.

    so i will receive 10 emails ^^ and they no have the next way after accept quote.

    (Must accept then reload page and go to account page or invoice form)

    Understand my bad english ???

    Thanks 🙂

    Plugin Author SlicedInvoices


    Je peux communiquer en francais ou en anglais.

    C’est une concern legitime. Le client ne devrait pas voir le bouton “accepter” apres qu’ils ont deja accepte. Je comprend bien, et peut-etre que je peux resoudre le probleme racine. Je travail une update. (Pardon mon mauvais francais)


    By the way, your English is not so bad. My French is worse. 🙂

    What I try to say is, this is a legitimate concern. The client should not see the “accept” button after they have already accepted. I understand and will work on an update to solve the root problem.

    This is something that should just work, without you having to override anything.

    Ahah so funny,

    How do you know i am french ?? 🙂

    Thanks to try to speak in french.

    Can i share you my code ? working with the last version of slicedinvoices

    Ok thanks, i will do 🙂

    see you

    Plugin Author SlicedInvoices


    Bonjour Mat,

    We just released an update to Sliced Invoices which includes a fix for this issue. Please try the new version (v3.3.3) and let me know if that solves the quote accept issue.

    By the way since I know you have our Easy Translate Extension, there’s an update of that as well (version 1.2.0) which will allow you to change the new text here (“You have accepted the quote.”, “You have declined the quote.”, etc.)

    (For anyone else reading this ticket, the new text is also translatable through Poedit.)

    Let me know if that works for you…



    oh great, thanks 🙂

    I see one problem.

    At the line 206 & 207, replace :

    $output =


    $output .=

    See you soon 🙂

    Plugin Author SlicedInvoices


    Wow, I can’t believe I missed that. Thank you for pointing it out.

    This is fixed, just released version 3.3.4. (I think v3.3.3 will now have been the shortest-lived version in the history of Sliced Invoices…)


    No problem 🙂

    i hope in the version 3.3.5 we would see the new french translation !!!!

    (i have already 50% translate french in stock and must work 2-3 hours for finish everything)

    see you 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Override class / functions’ is closed to new replies.