WPPizza – A Restaurant Plugin for WordPress › Support › Add-Ons › Extensions › Preorder › Support › Pre-Order
- AuthorPosts
- 4 April, 2025 at 12:45 pm #70353
Hi, I am very pleased with this module. Thx. The following features would be helpfull to me
1) Close the shop for pre-order 3 hrs before opening
2) A way to close the shop for pre-ordering manually
3) When no timeslot is available for pre-ordering – display a message to the customers, that no timeslots are available and hence it is not possible to preoder
Thx4 April, 2025 at 4:15 pm #703931) I do not think this will be implemented into the plugin anytime soon (probably never)
However you could use the wppizza_shop_is_open filter to close thet shop for orders (pre or not) between required times
something like :add_filter( 'wppizza_shop_is_open', array( $this, 'myprefix_force_shop_closed'), 101);//minimum priority of 101 or higher function myprefix_force_shop_closed($bool){ /*you need to do the between time conditionals here as required */ if([between date/time a and date/time b]){ return false; } return $bool; }
the globally available ‘wppizza_openingtimes_formatted()’ function might be helpful for the conditional
2) Simply enable->save the “Close Shop Now” in wppizza->openingtimes. this will override anything else
3) I believe is now fixed as of Preorder – v3.13
(I’m sure this worked in the past, but appears I’ broke it at some point, so thanks for the report)4 April, 2025 at 4:24 pm #70394As this might be helpful for others, I’ll reply to your other preorder request here:
— QUOTE —
I only accept 1 order per timeslot. I can see, when I delete an order for at specific time in the order history, the timeslot becomes available again.
Is there any status on the order history I can set, so the timeslot becomes available again?
— END QUOTE —
[admin: I suspect you mean without deleting or refunding an order as this would also have the same effect as you’ve noticed]So, as of Preorder – v3.13 you can do the following:
Goto WPPizza->Localization:
At the bottom you will find a section called “Admin Order History – Custom Statuses”
– Add “Label” (or whatever you like but cannot be empty) in the “Custom Options Label” field
– Add “Unblock” (not case sensitive, but can also be longer, but must include ‘unblock) as a/one of the “Custom Options [enter a comma separated list of options]” field. i.e something like
Unblock
orsome, option, UnBlock Timeslot
orxyz, doUnBlockMe, more, options
etcYou will now see a new dropdown to the left next to each order in the order history.
If you select/set this ‘unblock’ option for an order, the preorder timeslot gets unblocked so can be used again.Hope that helps
- AuthorPosts
- You must be logged in to reply to this topic.