Write a condition for WooCommerce code snippet

Job ID: 34022471

Budget: €8 – €30 EUR

Hey,

I have set up minimum order value for WooCommerce store with this snippet:

https://woocommerce.com/document/minimum-order-amount/

There is a problem that this snippet calculates shipping costs to total value, which we don't want. We need this minimum order value to be calculated from the items only.

Can you write a logic to that code snippet, so minimum order value is calculated from items in shopping cart only, without shipping costs included? It should completely ignore virtual products as well.

I know there is a plugin for this, but if this condition is easy to do, i prefer this option.