Title: Invoice generated when not required
Last modified: August 24, 2016

---

# Invoice generated when not required

 *  Resolved [Aeniss](https://wordpress.org/support/users/aeniss/)
 * (@aeniss)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/invoice-generated-when-not-required/)
 * Hi,
 * My issue is your plugin auto-generates an invoice (and its number) at the same
   time an order is placed, in stead of being generated when either I do it or the
   order switches to completed. Isn’t is that the way it should work?
    Now, the 
   problem is I have orders that have been placed, but not completed eventually.
   They ended as “cancelled” orders. The plugin automatically assigns an invoice
   number to that order – let’s say 1020. Then, even if I don’t generate the invoice
   and cancel that order, the next order will have 1021 as an invoice number. That
   way, my invoices are not respecting a sequential order. From invoice 1019, it
   skips to invoice 1021.
 * Do you have a solution for this issue, please?
 * Thanks.
 * [https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)

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

 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/invoice-generated-when-not-required/#post-6075946)
 * Hello Aeniss,
    The solution is quite simple: don’t attach any invoice to emails
   that are sent out before the order is completed. The plugin does not generate
   an invoice or invoice number unless you attach it to an email or manually create
   it.
 * So simply uncheck all emails in the General settings except the completed order
   email.
 * Hope that helps!
 * Ewout
 *  Thread Starter [Aeniss](https://wordpress.org/support/users/aeniss/)
 * (@aeniss)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/invoice-generated-when-not-required/#post-6076113)
 * Thank you for your prompt reply Ewout.
 * Unfortunately, if it was that simple it would have been fixed by now 🙂
 * That was the first thing I checked. Actually it is the way I’ve kept it configured
   since the very beginning. I only have two boxes checked: Customer Completed Order
   email and Customer Invoice email.
 * In spite of this settings, the plugin is still generating an invoice even without“
   touching an order”. I had an order that remained “untouched” until eventually
   I had to cancel it (so, not completed and not invoicing the customer). Nevertheless,
   the next order skipped a number and went to the next invoice number, as an invoice
   had been generated.
 * Any suggestion, please?
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/invoice-generated-when-not-required/#post-6076122)
 * Are you perhaps looking at the order numbers rather than the invoice numbers?
   
   I am 100% sure an invoice number is only generated when an invoice is created(
   unless you have custom code that forces otherwise, for example the invoice number
   in the packing slip or packing slip filename, or in the woocommerce email text,
   etc).
 * If you have placed any filters related to the PDF Invoice plugin in functions.
   php, please post all of them here. Did you make any modifications to the Simple
   template?
 * If you’re only running a default configuration with the default templates, there
   must be something else at play here. If you send me (temporary) admin credentials
   at [support@wpovernight.com](https://wordpress.org/support/topic/invoice-generated-when-not-required/support@wpovernight.com?output_format=md)
   I’ll take a look for you.
 * Ewout
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/invoice-generated-when-not-required/#post-6076176)
 * I’ve had contact with Aeniss, and it looks like an invoice was probably created
   for these orders after all!
 *  [pieterclaesen](https://wordpress.org/support/users/pieterclaesen/)
 * (@pieterclaesen)
 * [11 years ago](https://wordpress.org/support/topic/invoice-generated-when-not-required/#post-6076231)
 * Hi Ewout,
 * Has this issue been fixed already in the latest version of the plugin?
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [11 years ago](https://wordpress.org/support/topic/invoice-generated-when-not-required/#post-6076232)
 * Hello Pieter,
    This appeared to be a non-issue and indeed an invoice was already
   created for these orders. Double check your email settings and ask if someone
   else didn’t accidentally press the invoice button in the admin!
 * Kind regards,
    Ewout
 *  [lisangel](https://wordpress.org/support/users/lisangel/)
 * (@lisangel)
 * [11 years ago](https://wordpress.org/support/topic/invoice-generated-when-not-required/#post-6076253)
 * Hi Ewout,
    i’m desperate for the same problem of Peter. How did you solved it?
   did you? i’ve set the plugin to don’t attach any invoice to emails that are sent
   out before the order is completed. But as soon an order is request the plugin
   generate the pdf invoice and the Packing Slip. The two pdf are in my panel area
   but it already has generated a number. so if one order in not being payed or 
   cancell the following invoice has a sequencial number. What can I do to make 
   the plugin generate the pdf invoice file only after the completed order?
 * thank you for your help and attention…
    i’m really stuck by this problem.
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/invoice-generated-when-not-required/#post-6076259)
 * Hello Lisangel,
    This issue and all similar issues appeared to have 1 of these
   2 possible causes:
    - Somebody pressed the buttons (note that the buttons are displayed regardless
      of whether the PDF has been created!)
    - The email attachment settings, for example if you have checked the box for
      the admin new order email (which is always sent!), or the processing email(
      which is also sent for on-hold orders). The safest is to only check the ‘completed’
      and ‘invoice’ emails.
 * Hope that helps!
 * Ewout

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

The topic ‘Invoice generated when not required’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

## Tags

 * [Numbers](https://wordpress.org/support/topic-tag/numbers/)
 * [order](https://wordpress.org/support/topic-tag/order/)

 * 8 replies
 * 4 participants
 * Last reply from: [Ewout](https://wordpress.org/support/users/pomegranate/)
 * Last activity: [10 years, 12 months ago](https://wordpress.org/support/topic/invoice-generated-when-not-required/#post-6076259)
 * Status: resolved