Ready to Transform Your Online Presence? Let's Get Started!

Change add to cart button text in WooCommerce

If you have to change the default “Add to cart” button text in WooCommerce single product page and shop page or archive page, you must add the following hooks to achieve this.

Just put the below code in functions.php file of the currently active theme. I recommend you put this code in your child’s active theme if you have installed a child version of your theme or if you don’t have a child theme active so you can put it to your parent theme.

Note: I strictly recommend you that, use FTP or cpanel to add or edit any code in functions.php file.

// Change add to cart text on single product page
add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_add_to_cart_button_text_single' ); 
function woocommerce_add_to_cart_button_text_single() {
    return __( 'Add to Cart Button Text', 'woocommerce' ); 
}

// Change add to cart text on product archives page
add_filter( 'woocommerce_product_add_to_cart_text', 'woocommerce_add_to_cart_button_text_archives' );  
function woocommerce_add_to_cart_button_text_archives() {
    return __( 'Add to Cart Button Text', 'woocommerce' );
}

after adding this code you just have to replace ‘Add to Cart Button Text’ with your custom text that you want.