In a recent Business Bloomer Club Slack thread, a WooCommerce user reported a problem with completing old “on-hold” orders.
Payment and delivery had already been handled manually, but when attempting to update the status to “completed” via the WooCommerce dashboard, they encountered errors from their payment provider.
This is a frustrating scenario, especially when all the store owner wants to do is tidy up order records without triggering payment gateway interactions or sending unnecessary customer emails.
Here’s what’s happening, and how to safely resolve it.
What’s Causing the Error?
The message related to Vipps, a popular Scandinavian WooCommerce payment gateway. When you mark an order as “completed” from the WooCommerce dashboard, various hooks are triggered — including payment capture actions, which can fail if the payment has already been settled or the order is outdated.
Even if you disable customer notifications for “on-hold” and “completed” emails in the WooCommerce settings, backend hooks tied to order status changes still run.
This includes interactions with payment gateways like Vipps, which may attempt to reprocess or verify a transaction unnecessarily — and return an error when they can’t.
How to Mark Orders as Completed Without Triggering Hooks
If you’re comfortable using a database management tool like phpMyAdmin, you can bypass the WooCommerce interface and directly update the order status. This method avoids triggering any action or payment capture code.
Step 1: Backup Your Database
Always take a full database backup before running manual queries. Mistakes can’t be undone easily.
Step 2: Identify the Problem Orders
If you’re not on HPOS, you can run a simple SELECT query to list all affected orders:
SELECT ID, post_status FROM wp_posts WHERE post_type = 'shop_order' AND post_status = 'wc-on-hold'
Step 3: Update Order Status
If you’re dynamically selecting all “on-hold” orders and want to update them in bulk (and you’re sure you want to update all of them), you can simply write:
UPDATE wp_posts
SET post_status = 'wc-completed'
WHERE post_type = 'shop_order'
AND post_status = 'wc-on-hold'
This changes the order status without triggering any WooCommerce hooks or email notifications — including those related to payment gateways like Vipps.
Step 4: Confirm in the WooCommerce Dashboard
After running the update, check the order in the WooCommerce admin panel. It should now appear as “Completed” with no errors.
Why This Works
When you use the WooCommerce dashboard, status changes fire woocommerce_order_status_* hooks and possibly payment gateway actions like capture_payment. Going through the database skips those completely, making it the safest way to update the order status in this specific case.
However, this also means no other actions tied to that status change (e.g. inventory updates, email logs, third-party tracking) will run — which is the goal in this case, but something to be mindful of.
Conclusion
If WooCommerce is preventing you from updating old orders due to payment gateway restrictions — like with Vipps — the simplest workaround is to update the order status directly in the database. This bypasses hooks and ensures you won’t trigger capture errors or customer emails.








