• Resolved farooktransvelo

    (@farooktransvelo)


    Hi there,

    I would like to generate invoice number before packing slip. When generate PDF packing slip before PDF invoice the invoice number field is empty. For us we does not need invoice so we need to generate packing slip only.

    Thanks

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

    (@pomegranate)

    Hi! You can do this with a small code snippet:

    
    add_action( 'wpo_wcpdf_before_document', 'wpo_wcpdf_generate_invoice_number', 10, 2 );
    function wpo_wcpdf_generate_invoice_number( $document_type, $order ) {
    	if ($document_type == 'packing-slip') {
    		$invoice = wcpdf_get_invoice( $order, true );
    	}
    }
    

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    Thread Starter farooktransvelo

    (@farooktransvelo)

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Generate Invoice Number before Packing Slips’ is closed to new replies.