<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mirko (Preorvo)</title>
    <description>The latest articles on DEV Community by Mirko (Preorvo) (@hulk1982_dev).</description>
    <link>https://dev.to/hulk1982_dev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4249937%2Fc7ea80b8-a639-413c-ab50-1c9195cbddd4.png</url>
      <title>DEV Community: Mirko (Preorvo)</title>
      <link>https://dev.to/hulk1982_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hulk1982_dev"/>
    <language>en</language>
    <item>
      <title>Why WooCommerce pre-orders ship early (and how to stop it)</title>
      <dc:creator>Mirko (Preorvo)</dc:creator>
      <pubDate>Tue, 17 Nov 2026 13:15:15 +0000</pubDate>
      <link>https://dev.to/hulk1982_dev/why-woocommerce-pre-orders-ship-early-and-how-to-stop-it-516k</link>
      <guid>https://dev.to/hulk1982_dev/why-woocommerce-pre-orders-ship-early-and-how-to-stop-it-516k</guid>
      <description>&lt;p&gt;If you sell pre-orders on WooCommerce, there's one failure that hurts more than any other: an order for a product that doesn't exist yet lands in &lt;strong&gt;Processing&lt;/strong&gt;, your warehouse sees it, and someone tries to pack it.&lt;/p&gt;

&lt;p&gt;It happens more often than you'd think, and it's rarely a bug in your shop. It's how WooCommerce order statuses work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it happens
&lt;/h2&gt;

&lt;p&gt;WooCommerce has no built-in idea of "paid, but must not ship yet". Once a payment succeeds, the gateway calls &lt;code&gt;$order-&amp;gt;payment_complete()&lt;/code&gt;, and WooCommerce moves the order to &lt;strong&gt;Processing&lt;/strong&gt; (or &lt;strong&gt;Completed&lt;/strong&gt; for virtual/downloadable products). To your fulfilment flow, Processing means "ship it".&lt;/p&gt;

&lt;p&gt;Some common ways a pre-order ends up there:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Card and wallet payments.&lt;/strong&gt; Stripe, Apple Pay and Google Pay often confirm the payment through a webhook a few seconds after checkout. The webhook marks the order paid, and the status jumps to Processing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cash on delivery.&lt;/strong&gt; The COD gateway puts new orders straight into Processing by default.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manual and bulk edits.&lt;/strong&gt; Someone selects 40 orders in the list and runs "Change status to Completed". The pre-orders go with them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Other plugins and automations.&lt;/strong&gt; Shipping, ERP or label plugins that react to Processing will pick the order up the moment it gets there.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So putting "Pre-order" on the product page isn't enough. You need something that controls the &lt;strong&gt;order status&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The quick fix (and its limits)
&lt;/h2&gt;

&lt;p&gt;If your gateways all go through &lt;code&gt;payment_complete()&lt;/code&gt;, you can redirect pre-orders to another status with one filter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nf"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'woocommerce_payment_complete_order_status'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$order_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$order&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$order&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;get_items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;$item&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nv"&gt;$product&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$item&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;get_product&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;$product&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="s1"&gt;'yes'&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nv"&gt;$product&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;get_meta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'_my_preorder'&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s1"&gt;'on-hold'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$status&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works for many gateways, but it leaves gaps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gateways that set the status directly (like COD, which has its own &lt;code&gt;woocommerce_cod_process_payment_order_status&lt;/code&gt; filter) skip it.&lt;/li&gt;
&lt;li&gt;A manual or bulk status change still goes through.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On hold&lt;/strong&gt; is shared with "awaiting bank transfer" and other cases, so pre-orders get mixed in with everything else.&lt;/li&gt;
&lt;li&gt;Nothing releases the orders when the product finally arrives. You have to remember to do it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A more robust approach
&lt;/h2&gt;

&lt;p&gt;The reliable way is to stop thinking about &lt;em&gt;payments&lt;/em&gt; and guard the &lt;em&gt;status itself&lt;/em&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Give pre-orders their own status&lt;/strong&gt;, for example "Pre-ordered", so they're never confused with other on-hold orders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check every status change&lt;/strong&gt;, not just the payment step. Whenever an order is saved, if it contains a pre-order item and its release date hasn't passed, block any move to Processing or Completed, and leave a note explaining why.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Release automatically.&lt;/strong&gt; A scheduled check moves orders to Processing once every pre-order item has reached its release date, and emails the customer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Allow an intentional override.&lt;/strong&gt; If stock arrives early, an explicit "release now" action should be the only way to ship before the date.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Point 2 matters most: because it doesn't care &lt;em&gt;how&lt;/em&gt; the change happened (a webhook, COD, a bulk edit, another plugin), it covers the cases the payment filter misses.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you don't want to build it yourself
&lt;/h2&gt;

&lt;p&gt;Disclosure: I'm the developer of &lt;strong&gt;Preorvo&lt;/strong&gt;, a free plugin on WordPress.org that does exactly the four steps above. Paid pre-orders wait in their own "Pre-ordered" status, any early move to Processing/Completed is blocked and logged in the order notes, and orders are released and customers emailed on the release date. It works with HPOS and the block checkout.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://wordpress.org/plugins/preorvo/" rel="noopener noreferrer"&gt;https://wordpress.org/plugins/preorvo/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whether you use it or roll your own, the key idea is the same: &lt;strong&gt;don't trust the payment flow to keep a pre-order on hold. Guard the order status.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you've run into other ways pre-orders slip through, I'd like to hear about them in the comments.&lt;/p&gt;

</description>
      <category>woocommerce</category>
      <category>wordpress</category>
      <category>php</category>
      <category>ecommerce</category>
    </item>
  </channel>
</rss>
