Skip to main content

Make invoice number and order number same on Woocommerce PDF Invoices & Packing Slips

I absolutely love Woocommerce PDF Invoice & Packing Slips, not only does it fulfill all of my needs without purchasing an expensive plugin from WooThemes, it’s consistently updated by the developer and he offers quality support. I don’t know how he does this for free, he does sell templates for the PDF’s so support him if you can.

One little thing with the plugin is that the invoices numbers are different to the order numbers, which can cause confusion for customers. There’s an easy snippet of code that can fix this, making

invoice numbers the same as your order numbers, ending all the confusion.

Paste the below code into your functions.php

/**
 * Use order number as invoice number
 */
add_filter( 'wpo_wcpdf_invoice_number', 'wpo_wcpdf_format_invoice_number', 20, 4 );
function wpo_wcpdf_format_invoice_number( $invoice_number, $order_number, $order_id, $order_date ) {
    return $order_number;
}

 

2 thoughts to “Make invoice number and order number same on Woocommerce PDF Invoices & Packing Slips”

Leave a Reply