Created
April 22, 2026 12:35
-
-
Save rajeshsingh520/cf0b1eef446e3ec0bbb25aa7a02e9323 to your computer and use it in GitHub Desktop.
give discount when partial payment not selected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('woocommerce_cart_calculate_fees', function($cart) { | |
| if(class_exists('PISOL\DPMW\Session')){ | |
| $fees_selected = PISOL\DPMW\Session::partialPaymentSelectedInSession(); | |
| if(!$fees_selected){ | |
| $cart->add_fee( 'Custom Fee', -100 ); | |
| } | |
| } | |
| }, 20); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment