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

    (@pomegranate)

    Sure!
    https://ww.wp.xz.cn/support/topic/request-do-invoice-number-generation-work-before-invoice-email-generation

    Then do echo $invoice_number to display.

    If you only run this function when the invoice is already created automatically (which is not always the case!), you can also simply do:

    <?php
    $invoice number = get_post_meta( $order->id, '_wcpdf_invoice_number', true );
    echo apply_filters( 'wpo_wcpdf_invoice_number', $invoice_number, $order->get_order_number(), $order->id, $order->order_date );
    ?>

    Ewout

    Thread Starter zubeldialuis

    (@zubeldialuis)

    thanks for quick reply

    ok thats print the finals numbers of the invoice, but not the prefix. Any way to add it also? 😉

    Regards!

    Plugin Contributor Ewout

    (@pomegranate)

    Oops sorry! (The code from the first link does do that correctly though)

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

    Hi, i’m using the Pro version, in the credit note template i want to display the invoice number using the above method but it only show ‘Prefix -‘ without any invoice number.

    By the way i also using Sequential Order Numbers Pro plugin

    Plugin Contributor Ewout

    (@pomegranate)

    Hello Specex,
    Since you are using the Professional extension, you are entitled to premium support – send us an email at [email protected]. When you are at it, do include your current email template you want to change as an attachment. Thanks!

    Ewout

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘email template echo invoice number’ is closed to new replies.