Skip to content
Advertisement

Change product stock availability texts in Woocommerce

I am trying to change the in stock text next to the quantity available in woocommerce. I am using the stock management in product variations.

I tried this code below:

JavaScript

The code above changes the text but it does not pull in the stock quantity number from the variation stock manager.

Any help is appreciated.

Advertisement

Answer

The following code will handle all cases including the stock amount display with your custom texts:

JavaScript

Code goes in function.php file of your active child theme (or active theme). Tested and works.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement