Automatic Order Status Change after Full Payment in WooCommerce with Deposits & Partial Payments Plugin

Effective order status management in WooCommerce is the key to a smooth buying process and high customer service level. When using split payments, such as with the Deposits & Partial Payments by Acowebs plugin, you need to automate order statuses after receiving full payment. In this guide, I will show you how to automatically change the order status from “In Progress” to “Completed” after final payment.

How does standard WooCommerce order status process work?

Orders in WooCommerce pass through various statuses, including:

* “In Progress” (Processing / In Progress) – customer paid only a part (deposit), and the order is waiting for the next payment.
* “Completed” – customer paid the full amount, and the order is complete and shipped.

The Deposits & Partial Payments plugin allows customers to pay in installments, but by default it does not automatically change the order status to “Completed” after the last payment. We need to fix this.

Solution 1: PHP Code – Automatic Order Status Change After Full Payment

We will add a code snippet to the functions.php file of your theme, which checks if the customer has paid the full amount and changes the order status accordingly.

Step-by-Step:

* Log in to your WordPress panel.
* Go to Appearance > Editor (or use SFTP).
* Open the functions.php file of your child theme (if you have one).
* Paste the following code:

“`php
add_action(‘woocommerce_order_status_processing’, ‘update_order_status_after_full_payment’, 10, 1);

function update_order_status_after_full_payment($order_id) {
if (!$order_id) return;

$order = wc_get_order($order_id);

// Check if Deposits & Partial Payments plugin is used
if (function_exists(‘awcdp_get_order_remaining_balance’)) {
$remaining_balance = awcdp_get_order_remaining_balance($order_id);

if ($remaining_balance == 0) {
// Change order status to “Completed”
$order->update_status(‘completed’, __(“Received full payment – order completed.”, ‘woocommerce’));
}
}
}
“`

See also  Influencer marketing

Effect: When the customer makes the last payment, the order status will automatically change to Completed.

Solution 2: AutomateWoo Plugin (No Coding Required)

If you don’t want to edit PHP files, you can use the AutomateWoo plugin to create an automation rule.

How to configure it?

* Install and activate AutomateWoo.
* Go to AutomateWoo > Workflows > Add New.
* Set up a trigger: Order Updated (Order Updated).
* Add a condition: Balance = 0 (no remaining balance).
* Set an action: Change order status to “Completed” (Completed).
* Save and test.

Testing and Debugging

After implementing the solution:

* Place a test order with a deposit.
* Make the first payment – the status should be In Progress.
* Make the second (final) payment.
* Check if the status automatically changes to Completed.

If it doesn’t work:

* Check logs: WooCommerce > Status > Logs.
* Enable debugging in wp-config.php to get more information.