• Resolved andrewsumner

    (@andrewsumner)


    Is it possible to change the order in which the pages are generated? Currently they are oldest order first, is it possible to reverse this so that it is newest first as the orders appear in the woocommerce orders page by default?

Viewing 1 replies (of 1 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @andrewsumner,

    Yes, it is. You can reverse the orders sort, when using the PDF Bulk actions, with this code snippet:

    add_filter( 'wpo_wcpdf_bulk_document_sort_order', function() { return 'DESC'; } );

    Be aware that if the orders selected does not have a document yet, and the document creation is activated for these orders, the document numbering will be reversed too.

    For instance, let’s say that you have selected the orders #100, #101, and #102, your next invoice number will be 1, and they do not have a PDF invoice yet. When you try to generate the PDF invoice in bulk for these orders, this will be the invoice number given for each order:

    • Order #100 ? Invoice 3
    • Order #101 ? Invoice 2
    • Order #102 ? Invoice 1
Viewing 1 replies (of 1 total)
  • The topic ‘Change order of generated documents’ is closed to new replies.