• Hi!

    At first: thanks for your great software!

    I am wondering if it’s possible to use the unique customerid as a prefix in the invoice number?

    Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hi @dashorion

    Please try adding the code snippet below:

    add_filter( 'wpo_wcpdf_format_document_number', function( $formatted_number, $number, $document, $order ) {
    	if ( $document->get_type() == 'invoice' ) {
    		$prefix = $order->get_customer_id();
    		$formatted_number = $prefix . $formatted_number;
    	}
    	return $formatted_number;
    }, 10, 4 );

    If you never worked with actions/filters please read this documentation page: How to use filters

Viewing 1 replies (of 1 total)
  • The topic ‘Use unique userid as prefix for invoicenumber’ is closed to new replies.