Link a WooCommerce Product to an Existing Newer Version

I have to admit that I am a fan of what Amazon does, and there’s a feature I really like.

You know when you’re looking for a product, you find it, you’re about to buy it and at this moment moment, on the product page, you see a little notice stating that a newer version of the product is available! Wait! What? I was about to buy an already old version of a product I don’t even own yet? ;-)

Here is the result:

woocommerce-newer-product-version-frontend

woocommerce-more-recent-product-version-settings

Ok, so, to implement this feature within WooCommerce, it’s fairly simple. I wrote the snippet below so that you guys can start selling more than one version of a plugin (an old one and a new one!). Simply paste the code in functions.php in the theme folder and you’re done!

Please note: this code has been tested with WordPress 4.5 and WooCommerce 2.6 Beta 1.

About the author

Remi Hey! My name is Rémi Corson, I'm a French WordPress Developer, I code stuff and I write from time to time ;-) Buy a coffee
Show your support

Related Posts

4 comments

  1. […] Corson has a tutorial on linking to newer products with WooCommerce similar to how Amazon notifies you of new product […]

  2. nachumi_e:

    Hey Remi,
    I am a big fan of Amazon myself, and this is a great feature to have,
    So first i would like to thank you for the time you have taken for that amazing feature.

    however – using the code you have provided i wasn’t able to get the messege to show on the old product: The field is shown on the back-end properly, however seems like in the DP (detail page) it’s not appearing:
    OLD product: https://www.sabrent.com/product/USB-DSC5
    OLD product – Back-End: https://www.sabrent.com/uploads/2017-02-16_21-11-35.jpg

    NEW product: https://www.sabrent.com/product/USB-DSC8/

    Can you help me get that working?

  3. […] Link WooCommerce product to an existing newer version (remicorson.com) It might work best for digital products, as there are always newer versions being released. This piece of code can help you link newer versions to older pages. […]

Leave a Reply