{"id":2312,"date":"2018-06-21T08:45:08","date_gmt":"2018-06-21T07:45:08","guid":{"rendered":"https:\/\/simonday.com\/web-design-news\/?p=2312"},"modified":"2018-06-21T08:48:31","modified_gmt":"2018-06-21T07:48:31","slug":"changing-the-description-text-in-woocommerce-to-something-else","status":"publish","type":"post","link":"https:\/\/simonday.com\/news\/changing-the-description-text-in-woocommerce-to-something-else\/","title":{"rendered":"Changing the &#8220;description&#8221; text in WooCommerce to something else"},"content":{"rendered":"<p>A recent client had, what I thought, was a simple request in WooCommerce. Instead of the Header text for a product saying &#8216;Description&#8217;, he wanted it to say &#8216;Information&#8217; instead. This should be simple but it does require a little jiggery-pokery to get it to work&#8230;<!--more-->The easiest way I found of achieving this is to add a translate filter to the function.php file. What this will do is replace the word you want to change with the one you want.<\/p>\n<p>Please, BACK UP your site before doing this. <a href=\"https:\/\/en-gb.wordpress.org\/plugins\/updraftplus\/\" target=\"_blank\" rel=\"noopener\">UpdraftPlus<\/a> is one of the better plugins!<\/p>\n<p>Log into the dashboard of your WooCommerce website and from the left menu choose: <strong>Appearance &#8211;&gt; Editor<\/strong><\/p>\n<p>What you&#8217;re looking for is the Theme Functions file called functions.php<\/p>\n<p>Go to the very bottom of the page and add this code:<\/p>\n<p><strong>add_filter(&#8216;gettext&#8217;, &#8216;translate_text&#8217;);<\/strong><br \/>\n<strong>add_filter(&#8216;ngettext&#8217;, &#8216;translate_text&#8217;);<\/strong><\/p>\n<p><strong>function translate_text($translated) {<\/strong><br \/>\n<strong>$translated = str_ireplace(&#8216;Description&#8217;, &#8216;Information&#8217;, $translated);<\/strong><br \/>\n<strong>return $translated;<\/strong><br \/>\n<strong>}<\/strong><\/p>\n<p>In the above example, I am changing the word &#8216;<strong>Description<\/strong>&#8216; to &#8216;<strong>Information<\/strong>&#8216;<\/p>\n<p>Save the file and you should be good to go!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A recent client had, what I thought, was a simple request in WooCommerce. Instead of the Header text for a product saying &#8216;Description&#8217;, he wanted it to say &#8216;Information&#8217; instead. This should be simple but it does require a little jiggery-pokery to get it to work&#8230;<\/p>\n","protected":false},"author":2,"featured_media":2315,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[127,26],"class_list":["post-2312","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-help-guide","tag-woocommerce","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/posts\/2312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/comments?post=2312"}],"version-history":[{"count":3,"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/posts\/2312\/revisions"}],"predecessor-version":[{"id":2316,"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/posts\/2312\/revisions\/2316"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/media\/2315"}],"wp:attachment":[{"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/media?parent=2312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/categories?post=2312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/tags?post=2312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}