Enter your keyword


Customise `add to cart` text on single product pages in WooCommerce

Add the following to your functions.php file replacing 'my button text' with whatever you want it to say:

add_filter( 'add_to_cart_text', 'woo_custom_cart_button_text' );                                // < 2.1
add_filter( 'woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text' );    // 2.1 +
function woo_custom_cart_button_text() {
        return __( 'Buy Now', 'woocommerce' );

No Comments

Add your review

Your email address will not be published.

* Feilds are Required.