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

    (@pomegranate)

    Hi Brenn,
    You can use the following code:

    <?php global $wpo_wcpdf; echo $wpo_wcpdf->export->get_invoice_number( $order->id ); ?>

    Let me know if that works for you!

    Ewout

    Thread Starter Wheeliebrenn

    (@wheeliebrenn)

    Wow Ewout, you make it look easy.

    And for good measure to include “Invoice: #”, I used

    <h2><?php global $wpo_wcpdf; echo __( 'Invoice: #', 'wpo_wcpdf' ) . $wpo_wcpdf->export->get_invoice_number( $order->id ); ?></h2>

    Thanks so much for your help and for your amazing plugin!

    Brenn

    Plugin Contributor Ewout

    (@pomegranate)

    You’re welcome! Glad you like the plugin! You can put the “Invoice: #” tekst in front of the code too, unless you’re translating it (in which case you would need to add it to the po/mo files too).

    <h2>Invoice: #<?php global $wpo_wcpdf; echo $wpo_wcpdf->export->get_invoice_number( $order->id ); ?></h2>
    Thread Starter Wheeliebrenn

    (@wheeliebrenn)

    Your method is cleaner. I will switch to that!

    Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WCPDF Invoice number in emails’ is closed to new replies.