title: Customize Tax amount in "woocommerce_package_rates" hook
body: <p>I recently tried to modify all my shipping rates with hook to apply discount.</p>
  
  <p>Here's my code : </p>
  
  <pre><code>add_filter( 'woocommerce_package_rates', 'woocommerce_package_rates' );
  function woocommerce_package_rates( $rates ) {
      $user_id = get_current_user_id();
      if ( ! wc_memberships_is_user_active_member( $user_id, 'silver' ) ) { return $rates; }
      $discount_amount = 30; // 30%
  
      foreach($rates as $key =&gt; $rate ) {
          $rates[$key]-&gt;cost = $rates[$key]-&gt;cost - ( $rates[$key]-&gt;cost * ( $discount_amount/100 ) );
      }
  
      return $rates;
  }
  </code></pre>
  
  <p>But one more step is the tax ! I got wrong tax.<br>
  For example I have my shipping rate who cost <code>3$</code>. With the discount, it's now <code>2,10$</code>. </p>
  
  <p>I buy one item for <code>2$</code> and the shipping <code>2.10$</code>.
  I got 1$ for the tax (as the 3$ shipping cost. look like he doesn't take the changes) and normally it's <code>0.82$</code>.</p>
  
  <p>What do I need to get the correct tax calculation?</p>