Hi, Here is my code, but it doesnt work (crash my site)
/* WP PIZZA disable COD for delivery */
add_filter('wppizza_filter_gateways_orderpage', 'my_custom_gateways_filter');
function my_custom_gateways_filter($gateways){
/* disable Cash on delivery for all users if delivery */
if(wppizza_is_delivery()){
unset($gateways['COD']);//gateway keys are always uppercase
}
return $gateways;
}
Thank you for help