title: Modify cart total amount with filter or hook
body: <p>Okay so I'm trying to write a filter or hook that will modify the total amount of the shopping cart depending on the total overall amount of items in the shopping cart. For example, if there are three items in the shopping cart, I want to deduct twenty dollars from the total order. Below is the code I have so far, any help is greatly appreciated!</p>
  
  <pre><code>add_filter('woocommerce_cart_contents_total', 'bundle_deals');
  
  function bundle_deals( $cart_contents_total, $cart_contents_count) {
     global $woocommerce;
  
     if ($woocommerce-&gt;cart-&gt;get_cart()-&gt;cart_contents_count &lt;= 3) {
       $cart_contents_total = $woocommerce-&gt;cart-&gt;get_cart()-&gt;cart_contents_total - 20.00;
     }
  
     return $cart_contents_total;
  }
  </code></pre>