• Resolved ArcticFritid

    (@metuza)


    Hello,

    I am using this filter to change button text in my account page, wpo_wcpdf_myaccount_button_text but it seems to only work with invoice and not proforma.

    I am using invoice as order confirmation and proforma as delivery confirmation.

    Thanks
    Rune

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hello Rune,
    If you change the document title in the Documents > Proforma tab (version 2.2.0 or higher), this should change the my account button text too. That’s by far the easiest way ??
    Alternatively, you can change this with the filter wpo_wcpdf_myaccount_proforma_button which is the proforma equivalent of wpo_wcpdf_myaccount_button_text.

    If you have any other questions regarding the Professional extension, please email us at [email protected], www.remarpro.com does not allow us to use these forums for premium support.

    Thanks!

    Ewout

    Thread Starter ArcticFritid

    (@metuza)

    Hello Ewout!

    I did find the second filter so this did the trick:

    function wpo_wcpdf_myaccount_button_text( $button_text, $invoice ) {
    	if ( $invoice->get_title() == "Ordrebekreftelse" ) {
    	$button_text = "Ordre (PDF)";
    	}
    	if ( $invoice->get_title() == "Leveringsbekreftelse" ) {
    	$button_text = "Levering (PDF)";
    	}
    	return $button_text;
    }
    add_filter( 'wpo_wcpdf_myaccount_button_text', 'wpo_wcpdf_myaccount_button_text', 10, 2 );
    add_filter( 'wpo_wcpdf_myaccount_proforma_button', 'wpo_wcpdf_myaccount_button_text', 10, 2 );

    Thanks, i’ll use the email next time ..

    Brgds
    Rune

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change button text on Proforma’ is closed to new replies.