Do you want to change the default “Add to cart” button text in WooCommerce? If yes, you are at right place.
Below code snippet will help you to change default “Add to Cart” button text to “Order Now” or whatever you want.
Code Snippet:
add_filter('single_add_to_cart_text', 'optimum_cstm_cart_btn_text'); function optimum_cstm_cart_btn_text() { return __('Order Now', 'woocommerce'); //Replace Order Now with the text, you want to show on button }
How to use the code snippet:
- Open your theme’s functions.php file with your favorite text editor, or you can use wordpress editor to edit the file.
- Place above snippet at very end of the file.