search
Log In
Welcome to Blogiestools Ask, a blogging community where beginner and professional bloggers come to seek answers from other bloggers’ experiences.

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

Register or log in to ask questions or edit comments.
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.3k points

Related

1 vote
1 answer
How I do remove WooCommerce Checkout fields that is billing details and order comments without a plugin.
posted Nov 8, 2021 in WordPress Problems anonymous
0 votes
1 answer
I want to modify the WooCommerce checkout loading spinner gif and use my custom icon and text
posted 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
posted Nov 10, 2021 in Blog Optimization anonymous
0 votes
1 answer
I need to migrate my WordPress blog without installing backup plugins
posted 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
posted Nov 6, 2021 in WordPress Problems anonymous