One of my customers asked me if it is possible to change the standard “Add to Cart” button label on a per category basis.
To do this properly we have to create two filters:
- The first filter will target the button text for all standard posts and pages.
- The second filter is basically a copy of the first filter. The difference is that it will target the archive posts and products
In order to make it work properly on your website, you will need to include both filters in your theme’s functions.php file
The first filter:
And the second filter (you can place both filters below each other in your theme’s functions.php file).