Place in your theme’s functions.php file or custom plugin. Will only allow customers to checkout is their cart total is greater than 50.