title: Woocommerce custom coupon type with custom discount always return 0;
body: <p>what I am trying to do is creating custom coupon type with custom programmatically discount in woocommerce using hooks. This what my code looks like</p>
  
  <pre><code>//add new coupon type called "custom_discount"
  function custom_discount_type( $discount_types ) {
      $discount_types['custom_discount'] =__( 'custom discount', 'woocommerce' );
      return $discount_types;
      }
  
  // add the hooks
  add_filter( 'woocommerce_coupon_discount_types', 'custom_discount_type',10, 1);
  
  //function to get coupon amount for "custom_discount"
  function woocommerce_coupon_get_discount_amount($discount, $discounting_amount, $cart_item, $single, $coupon) {
          if ($coupon-&gt;type == 'custom_discount'){ //if $coupon-&gt;type == 'fixed_cart' or 'percent' or 'fixed_product' or 'percent_product' The code Works
              $discount = 85;
              return $discount;
              } else {
               return $discount;
              }
          }
  //add hook to coupon amount hook
  add_filter('woocommerce_coupon_get_discount_amount', 'woocommerce_coupon_get_discount_amount', 10, 5);
  </code></pre>
  
  <p>the coupon always return with 0(Zero) discount amount. Am I missing something. 
  Thanks for helping =)</p>