WooCommerce: How to Change the “Add to Cart” button text
WooCommerce must hard code the wording of certain elements in the plugin, including the Add to Cart button. You may prefer the button say something else or use your language.
You can change this one of two ways, by using gettext in a plugin (recommended) or replacing the text through custom functions or templates.
The Safe Way
Use this method if you do not have WordPress theme development skills or coding knowledge, or if you want your clients to have future control.
Note that WooCommerce comes in several languages, so you may find switching the language in the settings is far easier!
- Use Poor Guy’s Swiss Knife, a free plugin with just about every WooCommerce interface customization you need.
- OR Download and install a translation plugin such as Loco Translate and change the text in the default English file under WooCommerce. For texts found in StoreKit, add a new language to the StoreKit entry (select English for the default) then sync the theme and the file before making your changes. See Loco Translate help here.
Via Child Theme
- Create a child theme
- Add the custom function you need to define the new text. See WooCommerce documentation for code snippets.
Did you know?
Our friends at Jetpack are doing some incredible work to improve the WordPress experience. Check out Jetpack and improve your site's security, speed and reliability.
