Disclaimer

This blog is kind of my own personal work Notebook, and the processes below are only guaranteed to work for my specific configurations. So, use this info at your own risk, and please understand I won't be able to provide any help if you break something

Wednesday, July 1, 2020

Changing WooCommerce's Add to Cart button text

Changing WooCommerce's "Add to Cart" button text to "BUY NOW"

// Changing Add to Cart button text on individual product pages function woo_custom_cart_button_text() { return __('BUY NOW', 'woocommerce'); } 
add_filter('woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text'); 

 // Changing Add to Cart button text on product archive/listing pages function woo_custom_product_add_to_cart_text() { return __( 'BUY NOW', 'woocommerce' ); } 
add_filter( 'woocommerce_product_add_to_cart_text', 'woo_custom_product_add_to_cart_text' );

No comments:

Post a Comment