Categories
WooCommerce WordPress

Change “Add to Cart” text on single product page

<?php

function chetan_custom_cart_button_text() {

    return __( 'My Button Text', 'chetan' );

}

add_filter( 'add_to_cart_text', 'chetan_custom_cart_button_text' ); // WooCommerce < 2.1
add_filter( 'woocommerce_product_single_add_to_cart_text', 'chetan_custom_cart_button_text' ); // WooCommerce 2.1 +

Leave a Reply

Your email address will not be published. Required fields are marked *