Skip to content

Fix a Flow that closes every window

Use this guide when customers never see the You can still change this order banner, or when the configuration page warns that an invoice is issued as soon as an order is placed.

Why it happens

With Stop editing once an invoice exists switched on (the default), an edit window closes the moment an invoice exists for the order. An issued invoice has to keep matching what you sold.

Many shops have a Flow that creates the invoice when the order is placed: the trigger Checkout / Order / Placed (checkout.order.placed) with the action Generate documents for an invoice. Flows run right after the order is saved. So the window opens, the Flow creates the invoice within the same second, and the window closes again before the customer ever sees it. The order is released at once and is never held.

The plugin counts these documents as an invoice: the invoice, the cancellation invoice and the credit note, each also in its ZUGFeRD forms. A delivery note does not close the window.

Step 1: Find the Flow

  1. Open the plugin's configuration page: Extensions > My extensions, then Configure on Order Editing — Self-Service for Customers.
  2. At the top of the Edit window card, look for the warning: "An invoice is issued as soon as an order is placed, so every edit window will close before a shopper can reach it. Issued by: …". It names every active Flow that does this.

If there is no warning, check an affected order instead: open it in the administration, open the Changes tab and look at the Window closed row. The reason Invoice issued confirms that an invoice closed the window.

Step 2: Move the invoice to a later point

  1. Open Settings > Flow Builder and open the Flow named in the warning.
  2. Change what starts it, so the invoice is created after the window has ended. Choose the point that suits your accounting, for example:
    • when the order enters Open (State enter, state_enter.order.state.open). With the plugin, orders that had a window enter Open when they are released, so this runs right after the window. If you later switch Let customers edit their orders off, new orders are created directly in Open and this trigger no longer runs for them. Move the invoice back in that case.
    • when the order enters In progress or Done
    • when the delivery is marked as shipped
  3. Save the Flow.

Keep the other actions of the Flow, such as the order confirmation mail, on Checkout / Order / Placed if they belong there. Move only the invoice. If needed, split the Flow into two.

Step 3: Check the result

  1. Reload the plugin's configuration page. The warning is gone.
  2. Place a test order. The confirmation page shows the banner, and the order is On hold.
  3. After the window, the invoice is created by the Flow at the point you chose.

If you want to keep the invoice at checkout

You can switch Stop editing once an invoice exists off. Customers can then change orders that already have an invoice, and that invoice no longer matches the order. You then have to cancel the invoice and issue a new one yourself for every changed order. The plugin does not create correction invoices.

While an order has an invoice and its window is still open, the Order editing card on the Changes tab shows a warning: "Invoice … is out while this order can still change, until …. Later changes will not be on that invoice."

Your Vision. Signed, Sealed, Delivered.