What I want is simple: I want to display the lowest flat rate shipping cost on a product page in WooCommerce so I can display: "We already deliver orders from € ...".
It doesn't matter what shipping zone of customer country is active... I just need the overall (static) lowest flat rate cost available.
So far I have this:
foreach ((array) $delivery_zones as $key => $delivery_zone ) {
$shipping_costs = [];
foreach ($delivery_zone['shipping_methods'] as $value) {
$shipping_costs[] = $value->cost;
break;
}
echo (min($shipping_costs));
}
But this still outputs ALL the flat rate costs f.i.: 1,99 3,99 5,99
How can I only display the lowest (in this case 1,99) rate?
Many tnx!