Snippet for bloking Klarna for payment above x
-
Hello. Can you give me a snippet for removing Klarna from WC checkout for payments above a certain amount? It is rather crazy this is not part of your plugin. With Klarna, somone orders for 500€ then sends it all back. Klarna then charges us a big fee (a % of the order value) even though we made no money. We need to limit people using Klarna for larger orders.
I had a snippet but it was causing huge server load and errors. I was using this which evidently no longer works:
add_filter( 'woocommerce_available_payment_gateways', 'disable_klarna_above_250' ); function disable_klarna_above_250( $available_gateways ) { $maximum = 250; if ( WC()->cart->total > $maximum ) { unset( $available_gateways['klarna_payments'] ); } return $available_gateways; }
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Snippet for bloking Klarna for payment above x’ is closed to new replies.