Hide Paypal on Funnelkit Checkout
-
Hey, I’ve been desperately trying to disable the paypal buttons on the Funnelkit checkout pages, but it shows up again after the shipping method loads / on checkout update, here’s the code I tried and similiar solutions, I call the functiion in the sites header and it hides the Paypal payment option for a few seconds until the checkout fully loads / changes… Is there a chance to somehow Disable the paypal payment option?
Code used:add_filter(‘woocommerce_available_payment_gateways’, function($gateways){
if(is_checkout()){
$packages = WC()->shipping()->get_packages();
$has_methods = array_reduce($packages, function($has_methods, $package){
if(!$has_methods){
return !empty($package[‘rates’]);
}
return $has_methods;
}, false);if($has_methods == 1){
unset($gateways['ppcp']);
}
}
return $gateways;});
- You must be logged in to reply to this topic.