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 support@wpovernight.com, wordpress.org 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.