Black Friday & Cyber Monday SUPER SALE ALL WEEK:
Grab 40% OFF on plugins
Days
Hours
Minutes
Seconds

How to Refund Multiple Orders (via Bulk Actions) in WooCommerce (Compatible with HPOS Order Tables)?

In WooCommerce, the default refund status available on the edit order page works well for changing a single order to refund status. But you might also be required to change the status of multiple orders to refund status. Currently, the bulk actions dropdown on the WooCommerce > Orders page which provides several bulk actions but doesn’t include actions, such as changing multiple orders to the “Refunded” status.


In this post, we will see how to change multiple orders to refund status via the Bulk actions dropdown.

Solution: How to Refund Multiple Orders (via Bulk Actions) in WooCommerce

The code snippet will add an option named “Change status to Refunded” to the bulk actions dropdown on the WooCommerce Orders page. This option allows administrators to refund multiple orders simultaneously.

// Updating label in admin order list bulk actions dropdown
function ts_update_custom_dropdown_bulk_actions_shop_order( $actions ) {
 
   // Add default WooCommerce 'mark_refunded' action
    $actions['mark_refunded'] = __( 'Change status to Refunded', 'woocommerce' );

    return $actions;
}
add_filter( 'bulk_actions-woocommerce_page_wc-orders', 'ts_update_custom_dropdown_bulk_actions_shop_order', 20, 1 );
add_filter( 'handle_bulk_actions-woocommerce_page_wc-orders', 'ts_update_custom_dropdown_bulk_actions_shop_order', 20, 1 );

Output

By adding the “Change status to Refunded” option to the bulk actions dropdown, admins can quickly mark multiple orders for refunds all at once, making it easier to handle refunds without doing each one separately.

How to Refund Multiple Orders (via Bulk Actions) in WooCommerce (Compatible with HPOS Order Tables)? - Tyche Softwares

When the refund action is applied to multiple orders, the code also triggers the default “Refunded” process that happens on the edit orders page and adjusts the total costs accordingly.

How to Refund Multiple Orders (via Bulk Actions) in WooCommerce (Compatible with HPOS Order Tables)? - Tyche Softwares

The above code to change multiple orders to refund status is also compatible with HPOS Order Tables. Interested in exploring another useful feature that most admins prefer? You can filter WooCommerce orders by multiple statuses, which could be a game-changer for managing your daily tasks!

Browse more in: Code Snippets, WooCommerce How Tos, WooCommerce Tutorials

Share It:

Subscribe
Notify of
5 Comments
Newest
Oldest
Inline Feedbacks
View all comments
conhe
2 days ago

Hello and thank you for this snippet, will it refund the full amount of the order (all the products + shipping + taxes) for the selected orders ?

Edit : sorry, I’ve added the code and nothing appears in the dropdown. WOP is up to date as all plugins

Last edited 2 days ago by conhe
conhe
1 day ago
Reply to  Saranya

Hi Saranya and thank you for your answer. I tried but nothing works.. So, I took the code from ( https://www.tychesoftwares.com/how-to-add-custom-bulk-actions-to-woocommerce-admin-order-list/ ) and modified it with mark_refunded and it works great though

conhe
1 day ago
Reply to  Saranya

Update : it doesn’t “really” work as it didn’t refunded the customer. I have to go on paypal and do it myself. This is a manual refund and not an automatic. Any idea how to turn it automatic ?

5
0
Would love your thoughts, please comment.x
()
x