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

    (@pomegranate)

    Hi!
    Apart from using the footer text for this purpose, you could do either of the following:

    1) Use one of the template action hooks, specifically wpo_wcpdf_after_order_details. This is printed below the totals & customer notes.

    2) Use the wpo_wcpdf_footer filter to add your own text to the text entered in the settings.
    Here’s how to do that and only output this for packing slips:

    add_filter( 'wpo_wcpdf_footer', 'wpo_wcpdf_footer', 10, 1 );
    function wpo_wcpdf_footer ( $footer_text ) {
    	global $wpo_wcpdf;
    	if ($wpo_wcpdf->export->template_type == 'packing-slip') {
    		$new_text = "this text is added to the footer text";
    		$footer_text = $footer_text . $new_text;
    	}
    
    	return $footer_text;
    }

    (check out this thread for a related question/answer)

    Let me know if you have any other questions!

    Ewout

    Thread Starter ncfan2030

    (@ncfan2030)

    Ewout,

    Thanks for the help. I would actually like to add it right above the footer (or right below the order). Is this possible?

    An additional question…if I print 1 invoice the additional text works. If I print multiple invoices, the message does not show.

    Is there a way to fix this? Thanks!

    Plugin Contributor Ewout

    (@pomegranate)

    Hi! Which option did you choose? Option 1 sounds like what you’re after.

    Thread Starter ncfan2030

    (@ncfan2030)

    I am not sure how to put the message right above the footer.

    Also, when we print multiple invoices the notes that we add do not print.

    How can we fix this?

    Plugin Contributor Ewout

    (@pomegranate)

    Hi! To answer that question I need to know which method you chose ??
    Can you post the code that you used?

    Thanks!

    Ewout

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom text’ is closed to new replies.