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

How to Enable “Order Again” For More Statuses @ My Account Page in WooCommerce?

WooCommerce typically offers the ‘Order Again’ feature exclusively for ‘Completed’ orders. However, we can expand this functionality to include more order statuses with just a simple code snippet. This enhancement empowers customers to reorder easily, even if they encounter issues during the ordering process.

Solution: Enable “Order Again” For More Statuses

The code will set the order again button for orders defined in the code such as ‘failed’, ‘cancelled’, and ‘processing’. You can customize the array to include any order statuses you prefer, allowing customer to reorder items from those statuses.

add_filter( 'woocommerce_valid_order_statuses_for_order_again', 'ts_order_again_more_statuses' );
 
function ts_order_again_more_statuses() {
   return array( 'failed', 'cancelled', 'processing' ); // basically add as many statuses as you wish to the array
}

Output

When a customer visits the My Account page >view orders of cancelled order status the order again button is displayed only for cancelled orders.

How to Enable “Order Again” For More Statuses @ My Account Page in WooCommerce? - Tyche Softwares

You don’t need to rely solely on the order again button as shown here. Expand beyond just the ‘Order Again’ button by offering customers more options, like adding an edit orders button at WooCommerce My Account Page. This simple customization helps customers to make quick adjustments to their orders whenever needed.

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

Share It:

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x