Disable preorder option for orders that are delivered?

WPPizza – A Restaurant Plugin for WordPress Support Add-Ons Extensions Preorder Support Disable preorder option for orders that are delivered?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11667
    Danielle Stein
    Participant

      Hi, I have local pickup and delivery available for our site. I would like to hide the pickup time field for orders that are indicated to be delivered. How would I do that?

      Thanks!

      #11668
      Olly
      Admin & Mod

        you’d have to use a filter.
        somethig like this i guess

        
        add_filter( 'wppizza_filter_formfields_order', 'my_filter',99 );
        function my_filter($formfields) {
        if(empty($_SESSION['wppizza']['selfPickup'])){
        foreach($formfields as $ffkey=>$ff){
        if($ff['key']=='wppizza_preorder'){
        unset($formfields[$ffkey]);
        }
        }
        }
        return $formfields;
        }
        
      Viewing 2 posts - 1 through 2 (of 2 total)
      • The topic ‘Disable preorder option for orders that are delivered?’ is closed to new replies.