How to Change woocommerce add to cart button and text based on Product stock Availability.

Connect With Us In Our Social Media

S
U
B
S
C
R
I
B
E

Table of Contents

Post Intro

In this tutorial you will learn How to change WooCommerce add to cart button in Product List loop but depending on the product type

Youtube Tutorial

Sign in to unlock all code snippets and resources

100% tested and verified code snippets

New here? Register for free to get started

© Copyright – 2025 – All Rights Reserved.  Created by SuperWP

Post More Detail

In this tutorial you will learn How to change WooCommerce add to cart button in Product List loop but depending on the product type, like for example:

  1. For products with Variations, I want a text in add to cart button to: “Show product”
  2. For Simple products “Show product”
  3. For products Out of stock: “Unavailable”

archive/ shop page add to cart button

Out Of stock add to cart button

Conclusion In summary

Features added in this tutorial:
1. For products with Variations, I want a text in add to cart button to: “Show product”
2. For Simple products “Show product”
3. For products Out of stock: “Unavailable”

Stay UpTo Date with Latest Post And news: