Title: Filter doesn&#8217;t work properly
Last modified: April 7, 2019

---

# Filter doesn’t work properly

 *  Resolved [bhwarrior](https://wordpress.org/support/users/blackhatwarrior/)
 * (@blackhatwarrior)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/filter-doesnt-work-properly/)
 * Hi,
 * I’m using a filter to disable partial payment for certain products in the cart.
 * `add_filter('is_enable_wallet_partial_payment', '__return_false');`
 * This filter does work & disables the partial payment but It does not hide the
   following text on checkout page:
 * `$10.00 will be debited from your wallet and $20.00 will be paid through other
   payment method`
 * Can you please fix it so I don’t have to edit the template file & move it to 
   child theme directory?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [bhwarrior](https://wordpress.org/support/users/blackhatwarrior/)
 * (@blackhatwarrior)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/filter-doesnt-work-properly/#post-11400747)
 * It seems like your plugin is not compatible with Woocommerce Smart Coupons. So,
   I tried following piece of code to disable partial payment when coupon of type‘
   smart_coupon’ is applied on cart page but it didn’t work.
 *     ```
       add_action( 'woocommerce_applied_coupon', 'disable_partial_payment' );
       function disable_partial_payment() {
           foreach ( WC()->cart->get_coupons() as $code => $coupon ) {
               if($coupon->discount_type == 'smart_coupon'){
                   add_filter('woo_wallet_partial_payment_amount', '__return_false');
                   break;
               }
           }
       }
       ```
   
 * Can you please provide a solution?
 *  Plugin Author [Subrata Mal](https://wordpress.org/support/users/subratamal/)
 * (@subratamal)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/filter-doesnt-work-properly/#post-11407569)
 * Hi [@blackhatwarrior](https://wordpress.org/support/users/blackhatwarrior/)
 * Please use `woo_wallet_disable_partial_payment` filter insted of `is_enable_wallet_partial_payment`
   and let us know.
 * Thank you.
 *  Thread Starter [bhwarrior](https://wordpress.org/support/users/blackhatwarrior/)
 * (@blackhatwarrior)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/filter-doesnt-work-properly/#post-11409104)
 * Hi [@subratamal](https://wordpress.org/support/users/subratamal/)
 * I tried `woo_wallet_disable_partial_payment` filter but partial payment still
   doesn’t get disabled when a smart coupon is applied. Am I doing something wrong?
 * I’ve one more query regarding partial payment through wallet plugin. Why is a
   partial wallet payment applied to an order as negative fee & not payment method?
   Don’t you think it’s a wrong practice from accounting point of view? For example;
   When a $50 order is fully paid through wallet the Income from sale is $50. But
   when the same order is partially paid $25 through wallet & remaining $25 through
   Credit Card then Income from sale drops down to $25 only. It’s extremely difficult
   to generate actual sales report in WooCommerce when you’ve tons of people using
   partial wallet payments.
 *  Thread Starter [bhwarrior](https://wordpress.org/support/users/blackhatwarrior/)
 * (@blackhatwarrior)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/filter-doesnt-work-properly/#post-11451137)
 * I’ve resolved the issue with following piece of code:
 *     ```
       add_action( 'woocommerce_cart_calculate_fees','disable_partial_payment', 9, 1);
       function disable_partial_payment($cart) {
           foreach ( $cart->get_coupons() as $code => $coupon ){
               if($coupon->get_discount_type() == 'smart_coupon'){
                   add_filter('is_enable_wallet_partial_payment', '__return_false');
               }
           }
       }
       ```
   
 * You can close this thread but please reply to my query regarding partial payment.
 *  Plugin Author [Subrata Mal](https://wordpress.org/support/users/subratamal/)
 * (@subratamal)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/filter-doesnt-work-properly/#post-11838932)
 * Hi [@blackhatwarrior](https://wordpress.org/support/users/blackhatwarrior/)
 * Sorry for the delay in response. Yes, you are right but if we create a payment
   gateway for partial payment then it will disable all other WooCommerce gateways.
   That’s why we integrate it as a negative fee.
 *  Thread Starter [bhwarrior](https://wordpress.org/support/users/blackhatwarrior/)
 * (@blackhatwarrior)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/filter-doesnt-work-properly/#post-11838991)
 * Hi [@subratamal](https://wordpress.org/support/users/subratamal/),
 * No doubt partial payments is one of the best features of your plugin, but if 
   its not gonna work as a payment gateway, you should look for a better solution.
   Negative fee is definitely not how it should be applied to an order. I think 
   most of the people using your plugin with partial payment enabled have no idea
   how it affects the sales report. But when they realize it, they gonna start raising
   issues.
 * Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Filter doesn’t work properly’ is closed to new replies.

 * ![](https://ps.w.org/woo-wallet/assets/icon-256x256.png?rev=3360666)
 * [Wallet for WooCommerce](https://wordpress.org/plugins/woo-wallet/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-wallet/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-wallet/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-wallet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-wallet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-wallet/reviews/)

## Tags

 * [filter](https://wordpress.org/support/topic-tag/filter/)

 * 6 replies
 * 2 participants
 * Last reply from: [bhwarrior](https://wordpress.org/support/users/blackhatwarrior/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/filter-doesnt-work-properly/#post-11838991)
 * Status: resolved