pre-order Hours

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #66721
    qaraman
    Participant

      Hello, I have a small problem. There is an option not to set pre-orders days before opening times, but to set them 8 hours before opening times so that customers cannot order a day in advance but a maximum of 8 hours in advance.

      thanks in advance

      #66761
      Olly
      Admin & Mod

        Sorry, but there is no provision in the plugin for this.
        However, I could add a filter somewhere (probably be called ‘wppizza_preorder_filter_timeslots’ ) in the next update to allow you to filter the timeslots available if you need to .

        #66904
        qaraman
        Participant

          Thank you very much Olly, that’s great, I can imagine it will be of great help to many people. When will there be an update? Best regards

          #66906
          Olly
          Admin & Mod

            the plugin was updated on the 14th/
            The ‘wppizza_preorder_filter_timeslots’ and ‘wppizza_preorder_filter_parameters’ filters were added
            (in your case I would probably use the ‘wppizza_preorder_filter_timeslots’ filter, as this should be somewhat easier to manage)

            Hope that helps

            #66907
            Olly
            Admin & Mod

              along these lines

              
              add_filter('wppizza_preorder_filter_timeslots', 'myprefix_preorder_timeslots', 10 , 2);
              function myprefix_preorder_timeslots($timeslots, $pluginOptions){
              /*
              your conditionals here
              */
              return $timeslots;
              }
              
              #66995
              qaraman
              Participant

                Thank you very much Olly for the update, unfortunately I didn’t have ‘wppizza_preorder_filter_timeslots’, can you give me a bit more information.
                thank you very much for your help

                #66997
                Olly
                Admin & Mod

                  Sorry, I do not understand what you mean by “I didn’t have ‘wppizza_preorder_filter_timeslots’”
                  If you are running the latest version of the preorder plugin (currently 3.11) you will automatically “have it” as it’s part of the plugin which you can then use as described above

                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.