WooCommerce: Complete Button @ Order Admin

When managing WooCommerce orders manually, efficiency is everything—especially if you’re dealing with high volumes or handling custom fulfillment workflows.

Typically, to mark an order as “Completed,” you’d have to open the order, change the status from the dropdown, and then click “Update”. That’s an extra step that can feel repetitive if you’re doing it often.

In this quick developer tutorial, I’ll show you how to add a “Complete Order” button directly to the single order edit page in the WooCommerce admin. This button appears alongside the existing “Update” action and lets you instantly complete the order with one click—no need to manually change the status first.

It’s a small UI enhancement, but one that can save time and reduce friction in your daily order management tasks. Best of all, the solution only requires a lightweight PHP snippet you can add to your theme or custom plugin. Enjoy!

The new “Complete Order” button added below the standard Update button in the WooCommerce order edit screen.

PHP Snippet: Display a “Complete Order” Button @ WooCommerce Single Order Edit Page

This snippet adds a custom “Complete Order” button to the WooCommerce order edit screen in the WordPress admin.

It hooks into the woocommerce_order_actions_end action, which is triggered at the end of the order actions section (below the “Update” button).

The function checks if the order exists and is not already completed. If that’s the case, it builds a URL pointing to WooCommerce’s built-in woocommerce_mark_order_status AJAX handler, passing along the order ID, target status (completed), and a security nonce.

The resulting link is styled as a button and includes a dashicon for visual clarity. When clicked, it instantly updates the order status to “Completed” without needing to change the dropdown or click “Update”.

This is a simple yet effective customization that improves admin workflow by reducing the number of steps required to complete an order. It’s a great fit for stores that often manually review and process orders!

/**
 * @snippet       Complete Order Button @ WooCommerce Order Admin
 * @tutorial      https://businessbloomer.com/woocommerce-customization
 * @author        Rodolfo Melogli, Business Bloomer
 * @compatible    WooCommerce 9
 * @community     https://businessbloomer.com/club/
 */

add_action( 'woocommerce_order_actions_end', 'bbloomer_add_custom_complete_order_button' );

function bbloomer_add_custom_complete_order_button( $order_id ) {

    $order = wc_get_order( $order_id );    
    if ( ! $order || $order->has_status( 'completed' ) ) return;

    $args = [
        'action' => 'woocommerce_mark_order_status',
        'status' => 'completed',
        'order_id' => $order_id,
        '_wpnonce' => wp_create_nonce( 'woocommerce-mark-order-status' ),
    ];

    $url = add_query_arg( $args, admin_url( 'admin-ajax.php' ) );

    echo '<li class="wide">';
    echo '<a href="' . esc_url( $url ) . '" class="button" style="display: inline-flex; align-items: center; gap: 4px;"><span class="dashicons dashicons-saved"></span> Complete Order</a>';
    echo '</li>';
}

Where to add custom code?

You should place custom PHP in functions.php and custom CSS in style.css of your child theme: where to place WooCommerce customization?

This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101

Related content

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

2 thoughts on “WooCommerce: Complete Button @ Order Admin

  1. Hi Rodolfo, thank you for this practical piece of code. I’ve already implemented it!
    One question, is it possible to redirect the page after the button is pressed? You would not want to stay on the single order page but rather want to return to the orders page to continue working.

    Thank you!

    1. Hello Cor, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

Questions? Feedback? Customization? Leave your comment now!
_____

If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining the Business Bloomer Club to get quick WooCommerce support. Thank you!

Your email address will not be published. Required fields are marked *