Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Set the Minimum Order Amount to Checkout in WooCommerce

Hi Friends, hope you are doing good. If you want to set the Minimum amount for checkout on your WooCommerce store, then keep your close attention in this tutorial as I am going to share how to set the minimum order amount to checkout in WooCommerce with the help of WooCoomerce Hook woocommerce_checkout_process.

How to Set the Minimum Order Amount to Checkout in WooCommerce

Copy the below code and add at the end of your theme’s functions.php file.

add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' );

function wc_minimum_order_amount() {

	global $woocommerce;

	$minimum = 50;

	if ( $woocommerce->cart->get_cart_total(); add_error( sprintf( 'You must have an order with a minimum of %s to 
           place your order.' , $minimum ) );

	}
}

I hope this tutorial helps you, if you have any questions regarding WordPress, then feel free to put your comments in below comment section. Do you like & share this article with your friends, and don’t forget to follow us on Facebook and Twitter to learn cool WordPress tutorials.

The post How to Set the Minimum Order Amount to Checkout in WooCommerce appeared first on FreeWebMentor.



This post first appeared on Programming Blog Focused On Web Technologies, please read the originial post: here

Share the post

How to Set the Minimum Order Amount to Checkout in WooCommerce

×

Subscribe to Programming Blog Focused On Web Technologies

Get updates delivered right to your inbox!

Thank you for your subscription

×