title: Add fee based on specific cart total in WooCommerce
body: <p>I'm trying to add fee based on specific amount in art total. I want to show if the cart total is equal to or greater than total "$$$" amount add the fee, otherwise don't add. </p>
  
  <p>I know this works adding it to total, but I don't think it's checking to see if it is below dollar amount.</p>
  
  <pre><code>function woo_add_custom_fees(){
  
      $cart_total = 0;
  
      // Set here your percentage
      $percentage = 0.15;
  
      foreach( WC()-&gt;cart-&gt;get_cart() as $item ){ 
          $cart_total += $item["line_total"];
      }
      $fee = $cart_total * $percentage;
  
      if (  WC()-&gt;cart-&gt;total &gt;= 25 ) { 
  
       WC()-&gt;cart-&gt;add_fee( "Gratuity", $fee, false, '' );
  
      }
  
      else {
  
          return WC()-&gt;cart-&gt;total;
      }
  }
  add_action( 'woocommerce_cart_calculate_fees' , 'woo_add_custom_fees' );
  add_action( 'woocommerce_after_cart_item_quantity_update', 'woo_add_custom_fees' );
  </code></pre>
  
  <p>What I am doing wrong?</p>