title: Add fee based on specific payment methods in WooCommerce
body: <p>In WooCommerce I need to apply a custom handling fee for a specific payment gateway. I have this piece of code from here: <a href="http://www.endocreative.com/add-handling-fee-woocommerce-checkout/" rel="nofollow noreferrer">How to Add Handling Fee to WooCommerce Checkout</a>.</p>
  <p>This is my code:</p>
  <pre><code>add_action( 'woocommerce_cart_calculate_fees','endo_handling_fee' );
  function endo_handling_fee() {
      global $woocommerce;
  
      if ( is_admin() &amp;&amp; ! defined( 'DOING_AJAX' ) )
          return;
  
          $fee = 5.00;
      $woocommerce-&gt;cart-&gt;add_fee( 'Handling', $fee, true, 'standard' );
  }
  </code></pre>
  <p>This function add a fee to all transactions.</p>
  <p>Is it possible to tweak this function and make it apply for specific payment method only ?</p>
  <p>The other problem is that I want this fee to be applied on cart. Is it possible?</p>
  <p>I will welcome any alternative method as well. I know about the similar &quot;Payment Gateway Based Fees&quot; woo plugin, but I can't afford it.</p>