title: How to overwrite WooCommerce total shipping costs in function.php?
body: <p>I have a function to calculate total shipping costs in my functions.php</p>
  <pre><code>.
  .
  if($weight &lt; 5){
     if($land == &quot;DE&quot;){ $shipping_costs = 4.99;}
     if($land == &quot;AT&quot;){ $shipping_costs = 8.89;}
     if($land == &quot;CH&quot;){ $shipping_costs = 12.70;}
  }
  .
  .
  </code></pre>
  <p>How can i overwrite the total shipping costs in cart and checkout with the new $shipping_costs value?</p>