WooCommerce Hack: From Add to Cart to Buy Again with Discount

Encourage Reorders in WooCommerce: Add Buy Again and Apply Discount Automatically

Looking for a way to encourage customers to reorder products they’ve already purchased from your WooCommerce store? Adding a “Buy Again” button with a 5% discount for repeat purchases can be a powerful loyalty booster — and it doesn’t require any plugins!

In this guide, I’ll show you how to:

  • Change the “Add to Cart” text to “Buy Again” if the user has purchased the product before.
  • Automatically apply a 5% discount on those products during checkout.
  • Reward loyal customers and increase repeat sales — automatically!

📌 Step 1: Change “Add to Cart” to “Buy Again” (if purchased)

Let’s start with a small UX touch — modifying the button text on product and shop pages:

Result: Logged-in users who previously bought the product will now see “Buy Again” instead of “Add to Cart.”


💰 Step 2: Give a 5% Discount for Repeat Purchases

Let’s reward those loyal customers at checkout by detecting repeat purchases and applying a 5% discount dynamically.

Add this to your functions.php or a custom plugin:

Result: If a customer adds a product they’ve already purchased, WooCommerce will automatically apply a 5% discount during checkout.


🔔 Bonus: Show a Friendly Notice

Let your customer know they’re getting a reward — add this message to the cart:


🎯 Why This Works

  • Boosts Loyalty: Returning customers feel rewarded.
  • No Coupons Needed: Clean, automatic experience.
  • Easy to Extend: You can increase the discount, limit it to specific categories, or track how many repeat purchases are made.

💡 Want to Extend It?

Here are some bonus ideas:

  • Apply a larger discount if they’ve bought the product more than once.
  • Only apply the discount if they’re logged in for more than X days.
  • Add a “Recently Purchased” section with quick reordering.

Let me know if you’d like help building any of those — or turning this into a full plugin with settings in the WordPress dashboard.


🚀 Final Thoughts

This lightweight customization is a great way to encourage repeat orders on your WooCommerce store — no plugins, no extra overhead. Just a few lines of well-placed PHP and a more engaging customer experience.

Have questions or want to build more WooCommerce automations? Drop them in the comments or shoot me a message — happy to help!

Crazy about CRO?

15+ ideas for growing your eCommerce store

Join & get tip & tricks for eCommerce Growth

We don’t spam! Read more in our privacy policy

Leave a Reply

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