multi page invoice | WordPress.org

[ad_1]

Hi @martje65,

This can be achieved in two different ways:

  1. With a custom block, using the customizer included in Premium Templates, this way:

  2. With some PHP code, with a code snippet like this:
    /**
     * WooCommerce PDF Invoices & Packing Slips:
     * Add a page numbering on the invoices
     */
    add_action( 'wpo_wcpdf_after_document', function ( $document_type, $order ) {
    	if( $document_type == 'invoice' ) {
    		echo '<div style="position:fixed; left:0; bottom:-1cm; height: 1cm; width:100%">Page {{PAGE_NUM}} of {{PAGE_COUNT}}</div>';
    	}
    }, 10, 2 );

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

Please note that repeating the headers & footers, and adding a page numbering to your documents, doesn’t work if you also want to print the invoices in bulk from the order list, as the footers of multiple invoices will stack on top of each other. This can be solved using the Bulk export feature included in the Professional extension.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer