{"id":1425,"date":"2017-03-06T04:24:06","date_gmt":"2017-03-06T04:24:06","guid":{"rendered":"http:\/\/docs.contentviewspro.com\/?p=1425"},"modified":"2023-12-27T09:02:42","modified_gmt":"2023-12-27T09:02:42","password":"","slug":"change-text-add-cart-button-woocommerce","status":"publish","type":"docs","link":"https:\/\/contentviewspro.com\/documentation\/article\/change-text-add-cart-button-woocommerce\/","title":{"rendered":"Woocommerce &#8211; change the text of &#8220;Add to cart&#8221; button"},"content":{"rendered":"<p>With Content Views Pro, you can show products of Woocommerce easily. And with each product, you can show the Add-to-cart button with single click option.<br \/>\nIf you want to change the text of &#8220;Add to cart&#8221; button of Woocommerce, please add this code to file <strong>functions.php<\/strong> of your active theme:<\/p>\n<pre style=\"font-size:13px\">\n\/\/ CVP - change the text of \"Add to cart\" button of Woocommerce\nadd_filter( 'woocommerce_product_add_to_cart_text', 'woo_archive_custom_cart_button_text' ); \/\/ 2.1 +\nfunction woo_archive_custom_cart_button_text() {\n\treturn __( 'My Button Text', 'woocommerce' );\n}\n<\/pre>\n<p>Best regards,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With Content Views Pro, you can show products of Woocommerce easily. And with each product, you can show the Add-to-cart button with single click option. If you want to change the text of &#8220;Add to cart&#8221; button of Woocommerce, please add this code to file functions.php of your active theme: \/\/ CVP &#8211; change the &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/contentviewspro.com\/documentation\/article\/change-text-add-cart-button-woocommerce\/\"> <span class=\"screen-reader-text\">Woocommerce &#8211; change the text of &#8220;Add to cart&#8221; button<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"doc_category":[50],"doc_tag":[21,20],"class_list":["post-1425","docs","type-docs","status-publish","hentry","doc_category-woocommerce","doc_tag-custom-code","doc_tag-woocommerce"],"year_month":"2026-09","word_count":91,"total_views":"2","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"admin1","author_nicename":"admin1","author_url":"https:\/\/contentviewspro.com\/documentation\/author\/admin1\/"},"doc_category_info":[{"term_name":"WooCommerce","term_url":"https:\/\/contentviewspro.com\/documentation\/cats\/woocommerce\/"}],"doc_tag_info":[{"term_name":"custom PHP code","term_url":"https:\/\/contentviewspro.com\/documentation\/tags\/custom-code\/"},{"term_name":"WooCommerce","term_url":"https:\/\/contentviewspro.com\/documentation\/tags\/woocommerce\/"}],"_links":{"self":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/1425","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/comments?post=1425"}],"version-history":[{"count":1,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/1425\/revisions"}],"predecessor-version":[{"id":5366,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/1425\/revisions\/5366"}],"wp:attachment":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/media?parent=1425"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_category?post=1425"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_tag?post=1425"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}