How to configure WordPress Automatic Plugin Perfectly

Blog Wordpress automatic Plugin

Sometimes there are requirements to change the default Button text on your WordPress & Woocommerce websites and with the latest release of Woocommerce coming across, it has brought in some cool features along with it.

One of the features that have made life easier is changing the button text “Proceed To Checkout” when the cart  has more than an item in it.

Instead of the default text, you can make more personalized statements such as “Make a Payment”, ” Pay Now” or “Check Shipping Details and Pay” or simply “Checkout”, all of these can be achieved with a few lines of code on the function.php

Please note : (It will show a “Return of Store” if there is are no items on the cart. To change the text you can read the article here.)

The filter in question is woocommerce_button_proceed_to_checkout() and below script can be used to change the text.

<?php
/**
* Change Proceed To Checkout Text in WooCommerce
* Place this in your Functions.php file
**/
function woocommerce_button_proceed_to_checkout() {
 $checkout_url = WC()->cart->get_checkout_url();
 ?>
 <a href="<?php echo $checkout_url; ?>" class="checkout-button button alt wc-forward"><?php _e( 'Checkout', 'woocommerce' ); ?></a>
 <?php
 }

To activate the functionality the above snippet can be added directly to your themes function.php.

But we would recommend against making changes to the functions.php, as you would have to repeat the process all over whenever there is an update to your themes.

Instead, you can use Code Snippets Plugin which is a great tool to manage all of your snippets on a single page. To learn more about Code Snippets and how to use them you can read our article here.

If you need details instructions on how to update and write to the functions.php you can refer to the article here.

Leave a Comment

Your email address will not be published. Required fields are marked *