search
Log In
Welcome to BlogiesTools Ask, a platform where beginners and professional bloggers come to seek answers from other bloggers’ experiences.

You can register and login to ask or answer a question or do it anonymously without logging in.

You can ask questions related to starting a blog, monetizing a blog, marketing a blog, managing a blog, fixing a problem, best tools to use, etc.

Ask a Question

0 votes
I need a code to change WooCommerce add cart button text without installing a plugin
in WordPress Problems

1 Answer

0 votes

To change WooCommerce add to cart button text without using a plugin, then add the following function to your theme's functions.php files.


NOTE: Remember to edit and replace the BUY NOW text with your custom text. 

add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_custom_cart_button_text_blogies' );    
 
function woocommerce_custom_cart_button_text_blogies() {
 
        return __( 'BUY NOW', 'woocommerce' );
 
}

15.0k points

Related questions

1 vote
1 answer
How I do remove WooCommerce Checkout fields that is billing details and order comments without a plugin.
asked Nov 8, 2021 in WordPress Problems anonymous
1 vote
1 answer
How do I add expires HTTP headers to my WordPress blog without using a plugin
asked Nov 10, 2021 in Blog Optimization anonymous
0 votes
1 answer
I want to modify the WooCommerce checkout loading spinner gif and use my custom icon and text
asked Nov 8, 2021 in WordPress Problems anonymous
0 votes
1 answer
I need to migrate my WordPress blog without installing backup plugins
asked Nov 15, 2021 in WordPress Problems anonymous
0 votes
1 answer
Am looking for a solution on how to hide or completely delete Successfully Added to Cart message in WooCoommerce
asked Nov 6, 2021 in WordPress Problems anonymous