You shouldn’t modify the woocommerce files. You’d better use the provided hook in your functions.php like this:
function my_needs_payment( $needs_payment, $cart ) {
if ( !$needs_payment ) {
// Maybe perform some additional checks here using the $cart data
// Then assign 'true' if you want to force payment
$needs_payment = true;
}
return $needs_payment;
}
add_filter( 'woocommerce_cart_needs_payment', 'my_needs_payment' ), 10, 2 );