Woocommerce custom coupon type with custom discount always return 0;
问题 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 //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