OK, I got this working. apparently the *checkout_process actions actually fire after you click “place order” not when you first hit the checkout page. We need the function to fire as soon as the page loads.
add_action('the_post','minimum_order_func',10);
function minimum_order_func(){
global $woocommerce;
if (is_checkout()){
$minorder = 50;
if( $woocommerce->cart->subtotal < $minorder){
$woocommerce->add_error( sprintf(__('Sorry, you have not met the minimum order amount of $' . $minorder . '. <a href="%s">Return to homepage →</a>', 'woocommerce'), home_url()) );
wp_redirect( get_permalink( woocommerce_get_page_id( 'cart' ) ) );
exit;
}}}
Don’t hack up the woocommerce plugin, cos when they release an update, your changes will be gone. The point of hooks is so you can apply your mods outside of the core code.
Most people put this kind of stuff at the bottom of their theme’s functions.php, although it’s sometimes a good idea to wrap it up in a separate plugin. You’ll be fine to put this in your functions.php, though.