Reserve Your Free Seat for Our Next WooCommerce Class! Search
Business Bloomer
  • Business Bloomer Club
  • WooCommerce Plugins
  • WooCommerce Tips
  • Log In
  • 0
  • Business Bloomer Club
  • WooCommerce Plugins
  • WooCommerce Tips
  • Log In
  • Search
  • Contact
  • Cart
WooCommerce Code Snippets My Account Order Status

WooCommerce: “Order Again” Button For Cancelled Status

Last Revised: Feb 2024

STAY UPDATED

The WooCommerce “ORDER AGAIN” button allows customers to quickly reorder items they have purchased in the past, which can be a valuable tool for both customers and store owners, offering convenience and encouraging repeat purchases.

The “ORDER AGAIN” button shows on the Thank You page after completing an order and on the individual View Order page within the customer’s My Account page, but only for completed orders.

What if we want to enable this feature for processing orders as well? Or maybe for cancelled ones? Well, let’s see how they do it!

Thanks to the snippet below, cancelled orders now show the “Order again” button under My Account > Orders > View Order!

PHP Snippet: Enable “Order Again” For More Statuses @ My Account

/**
 * @snippet       Order Again For Additional Order Statuses
 * @tutorial      https://businessbloomer.com/woocommerce-customization
 * @author        Rodolfo Melogli, Business Bloomer
 * @compatible    WooCommerce 8
 * @community     Join https://businessbloomer.com/club/
 */

add_filter( 'woocommerce_valid_order_statuses_for_order_again', 'bbloomer_order_again_more_statuses' );

function bbloomer_order_again_more_statuses() {
	return array( 'completed', 'cancelled' ); // basically add as many statuses as you wish to the array
}

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

  • WooCommerce: Separate Login, Registration, My Account Pages
    There are times when you need to send logged out customers to a Login page and unregistered customers to a standalone Register page. As you…
  • WooCommerce: Add New Tab @ My Account Page
    One of the features of Business Bloomer Club is the provision of Premium WooCommerce Q&A Support to supporters who enroll. So, how to add an…
  • WooCommerce: How To Make A Website GDPR Compliant? (12 Steps)
    Ok, we all know that the EU General Data Protection Regulation (GDPR) will come into force on the 25th May 2018. So the main question…
  • WooCommerce Visual Hook Guide: My Account Pages
    Hey WooCustomizers, the Visual Hook Guide is back 🙂 In this episode, I’ve created a visual HTML hook guide for the WooCommerce Account Pages (there…
  • WooCommerce: Add First & Last Name to My Account Register Form
    Here’s yet another useful PHP snippet – and a mini-plugin alternative with super simple settings – that adds the Billing First Name and Billing Last…

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

6 thoughts on “WooCommerce: “Order Again” Button For Cancelled Status”

  1. Vikas Sharma
    October 20, 2024

    its working great shoptimizer theme

    Reply
    1. Rodolfo Melogli
      October 24, 2024

      Nice!

      Reply
  2. Gareth Rowlands
    June 28, 2024

    I quite like this idea, thank you. Do you know if it could be added to the back-end order summary to enable repeat manual orders to be created without typing in all of a guest customer’s details?

    Reply
    1. Rodolfo Melogli
      July 11, 2024

      Gareth, 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!

      Reply
  3. STDEV
    February 21, 2024

    It is not working on Flatsome Theme.

    Reply
    1. Rodolfo Melogli
      March 12, 2024

      Can you see the “Order Again” button for completed orders?

      Reply
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!

Cancel reply

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


Search WooCommerce Tips

Popular Searches: Visual Hook Guides - Checkout Page - Cart Page - Single Product Page - Add to Cart - Emails - Shipping - Prices - Hosting

Recent Articles

  • WooCommerce: Redirect Empty Paginated Category Pages (404)
  • WooCommerce: Complete Button @ Order Admin
  • WooCommerce: Allow Guest Checkout For Existing Customers
  • WooCommerce: Simplify Free Checkout
  • WooCommerce: Inject Ad After the nth Product @ Shop Page

Latest Comments

  1. Rodolfo Melogli on WooCommerce: Separate Login, Registration, My Account Pages
  2. Rodolfo Melogli on WooCommerce: Complete Button @ Order Admin
  3. Rodolfo Melogli on WooCommerce: Failed Orders Monitor & Temporary Lockdown

Find Out More

  • Become a WooCommerce Expert
  • Business Bloomer Club
  • WooCommerce Blog
  • WooCommerce Weekly
  • Contact

Contact Info

Ciao! I'm Rodolfo Melogli, an Italian Civil Engineer who has turned into an international WooCommerce expert. You can contact me here:

Twitter: @rmelogli

Get in touch: Contact Page

Business Bloomer © 2011-2025 - VAT IT02722220817 - Terms of Use - Privacy Policy

Cart reminder?

x