Today you’ll learn how to change the messaging or verbiage for elements in the Shopp product editor. For this tutorial, we’ll use SKU as an example and this can be applied to other elements in the product editor.
Various elements in the Shopp product editor are wrapped in the Shopp language domain. This means that they can be changed by using a Learn more about the gettext filter for WordPress.
Here is an example for changing SKU to Part Number:
The phrase or messaging before the arrow is the match that the gettext filter is looking for. The phrase or messaging after the arrow is what it should be changed to. Here is what the gettext filter above will do:
- SKU will be changed to Part Number
- Stock Keeping Unit with be changed to Part Number
- Enter a unique stock keeping unit identification code will be changed to Enter a unique part number.
Before and after examples can be seen below:
These changes will apply where ever a translation string is in use that matches (e.g. The translation string for SKU will be changed site-wide for Shopp). This includes the Shopp product editor as well as on the front-end of your site such as in Shopp content templates.
The sample coding can be added to your child theme’s functions.php file or via a site specific plugin.