Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter luck7

    (@luck7)

    Hi Ewout,

    I should have looked for the documentation and read it fist. Apologies!

    I see what the problem is. I hadn’t thought of the requirement that invoice numbers must be sequential by law, and that cancelled or unpaid order will mess with the sequence.

    Many thanks for your great support. I’ll get myself a nice premium template to compensate for your time.

    Best regards,
    Luck Hermsen

    Thread Starter luck7

    (@luck7)

    Hi Ewout,
    Thanks for the fast reply!

    The Custom Order Numbers plugin creates a custom, sequential order number.
    I’m using S-2018-x. I have a feeling it doesn’t acutally change the (post)number, but only creates a reference. Not sure though.

    I found this snippet online yesterday:

    
    /**
     * 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;
    }
    

    This seems to work. It’l copy the custom order Id (S-2018-X) and make the invoicenumber identical to it.

    However, what do you mean by being sure the plugin doesn’t create order numbers for unfinished or cancelled orders? In what way would that create a problem?

    Many thanks for the support!

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