{"id":35068,"date":"2014-07-07T05:21:25","date_gmt":"2014-07-07T09:21:25","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=35068"},"modified":"2015-05-20T09:48:41","modified_gmt":"2015-05-20T13:48:41","slug":"woocommerce-how-to-change-add-to-cart-button-text","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/woocommerce-how-to-change-add-to-cart-button-text.html","title":{"rendered":"WooCommerce. How to change &#8220;Add to cart&#8221; button text"},"content":{"rendered":"<p>This tutorial is going to show you how to change the default text of the &quot;Add to cart&quot; button on your WooCommerce template.<\/p>\r\n\r\n<a href=\"http:\/\/www.youtube.com\/watch?v=XgI7N-mRZls?width=1280&amp;height=720\" rel=\"prettyPhoto\">WooCommerce. How to change &#8220;Add to cart&#8221; button text<\/a>\r\n\r\n<ol>\r\n <li>On your FTP go to the <strong>wp-content\\themes\\theme#####\\includes<\/strong> directory (where <strong>##### <\/strong>is your template number).<\/li>\r\n <li>Find  <strong>custom-function.php<\/strong> file and open it for editing.<\/li>\r\n <li>Scroll down and add the following code before <strong>?&gt;<\/strong>\r\n<p>To change add to cart text on single product pages:<\/p>\r\n \r\n<a href=\"\/help\/wp-content\/uploads\/2014\/06\/woocommerce_add_to_cart_button_text_changing_1.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/06\/woocommerce_add_to_cart_button_text_changing_1-300x148.jpg\" alt=\"woocommerce_add_to_cart_button_text_changing_1\" width=\"300\" height=\"148\" class=\"aligncenter size-medium wp-image-35069\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/06\/woocommerce_add_to_cart_button_text_changing_1-300x148.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/06\/woocommerce_add_to_cart_button_text_changing_1-150x74.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/06\/woocommerce_add_to_cart_button_text_changing_1.jpg 806w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\r\n<pre class=\"brush:php\">\r\n[glossary_exclude] \r\nadd_filter( 'add_to_cart_text', 'woo_custom_single_add_to_cart_text' );                \/\/ < 2.1\r\nadd_filter( 'woocommerce_product_single_add_to_cart_text', 'woo_custom_single_add_to_cart_text' );  \/\/ 2.1 +\r\n \r\nfunction woo_custom_single_add_to_cart_text() {\r\n \r\n    return __( 'My Button Text', 'woocommerce' );\r\n \r\n}\r\n[\/glossary_exclude]\r\n<\/pre>\r\n\r\n<p>To change add to cart text on product archives:<\/p>\r\n\r\n<a href=\"\/help\/wp-content\/uploads\/2014\/06\/woocommerce_add_to_cart_button_text_changing_2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/06\/woocommerce_add_to_cart_button_text_changing_2-300x181.jpg\" alt=\"woocommerce_add_to_cart_button_text_changing_2\" width=\"300\" height=\"181\" class=\"aligncenter size-medium wp-image-35070\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/06\/woocommerce_add_to_cart_button_text_changing_2-300x181.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/06\/woocommerce_add_to_cart_button_text_changing_2-150x90.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/06\/woocommerce_add_to_cart_button_text_changing_2.jpg 832w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\r\n<pre class=\"brush:php\">\r\n[glossary_exclude] \r\nadd_filter( 'add_to_cart_text', 'woo_custom_product_add_to_cart_text' );            \/\/ < 2.1\r\nadd_filter( 'woocommerce_product_add_to_cart_text', 'woo_custom_product_add_to_cart_text' );  \/\/ 2.1 +\r\n \r\nfunction woo_custom_product_add_to_cart_text() {\r\n \r\n    return __( 'My Button Text', 'woocommerce' );\r\n \r\n}\r\n[\/glossary_exclude]\r\n<\/pre>\r\n\r\n<p>(where <strong>'My Button Text' is the new name of your &quot;Add to cart&quot; <\/strong>button)<\/p>\r\n<\/li>\r\n\r\n<li>Save the changes and check your website. The new name of the button should show up now.<\/li>\r\n<\/ol>\r\n\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n\r\n<a href=\"http:\/\/www.youtube.com\/watch?v=XgI7N-mRZls?width=1280&amp;height=720\" rel=\"prettyPhoto\">WooCommerce. How to change \"Add to cart\" button text<\/a>","protected":false},"excerpt":{"rendered":"<p>This tutorial is going to show you how to change the default text of the &quot;Add to cart&quot; button on your WooCommerce template.<\/p>\n","protected":false},"author":30,"featured_media":35076,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1556],"tags":[1158,614,1183,518,1010,1490,2418],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/35068"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=35068"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/35068\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/35076"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=35068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=35068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=35068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}