MARINE

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Cash only when pickup #55177
    MARINE
    Participant

      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

    Viewing 1 post (of 1 total)