Additional information
Licence type |
Single site licence (£45 / £55), Up to 5 sites (£65 / £75), Up to 25 sites (£125 / £145) |
Renewal type |
Automatic renewal (subscription – discounted), Manual renewal |
Choosing a time: (Note: the time format used will be what you have set in your WordPress settings – i.e. it does not have to be the 24 hour format in our screenshot below)
Instead of the sliders shown in the screenshot below, you can have a drop-down if you prefer.
Choosing a suitable time
Or you can allow users to choose a time slot:
You can limit the number of customers who can use/choose the same time period, or limit the number of items ordered in that time period.
Information shown to the customer
Note – the message is configurable; in this example, we were using the plugin on a restaurant site.
A message appearing on the product page of a specific item (of course, your theme’s styling will be used on the front-end; and the message is configurable):
Customer order email (Note: the time format used will be what you have set in your WordPress settings – i.e. it does not have to be the 24 hour format in our screenshot below)
Chosen time displayed in the dashboard
Editing the time chosen:
Chosen times shown in the order listing
Single list of chosen times
The date/time format used for this list is according to what is configurable – it is what has been chosen in WordPress’s date/time options.
Using a short-code to show content conditionally, depending on the shop opening status (remember to exclude any pages with conditional content from your cacheing plugins!):
Other options available:
- Choose to have the times apply even with virtual goods (i.e. goods which don’t require physical delivery). e.g. If you wish to close your store on Sunday for all your products, whether they require shipping or not, then you can.
- Choose to apply your settings only if products from certain shipping classes are in the cart. i.e. If your store sells mixed goods of different kinds, and if Woo Commerce’s built in “virtual” attribute is not enough, then you can also use this option to decide which goods are subject to timing restrictions.
- Choose a maximum time (number of days) in the future that can be chosen.
- Choose a maximum number of times that customers can choose a particular opening period, optionally per-delivery method (e.g. a maximum of 10 deliveries between 6pm and 7pm, but no limit on orders collected).
- Choose a “minimum order fulfilment” time. Times chosen must be at least this far in the future (and the default time suggested will fulfil this criteria). As you’d expect, if your shop closes for the day within this time period, then the customer will have to choose a time on the next available day (so, it can be used to enforce a “last orders for the day” time). This can be made to depend upon the current time of day – e.g. you can choose delivery tomorrow, as long as today it’s not yet 5pm when you order. You can also have different fulfilment times for different shipping methods.
- Use a shortcode (openinghours_conditional) to show content only if the shop is currently open (or closed).
As is the norm with most WordPress premium plugins (and all official Woo Themes Woo Commerce extensions), your purchase not only includes the plugin, but access to new versions for 12 months. (After 12 months, you can carry on using the version you have installed; or you are welcome to purchase again for access to future releases)
Additional information:
Licence type |
Single site licence (£45 / £55), Up to 5 sites (£65 / £75), Up to 25 sites (£125 / £145) |
Renewal type |
Automatic renewal (subscription – discounted), Manual renewal |
Information for Developers:
Firstly, please note that standard plugin support does not include hands-on assistance with customisations to the plugin that involve writing PHP code. There is an example, and links to tutorials, below. If you need to hire a developer to implement a PHP-based customisation, then we recommend Codeable, a marketplace of many WordPress/PHP developers who are available at good rates.
A short code, [openinghours_conditional only_if=”(open|closed)”], is available. Content contained inside the opening and short code tags will only render if the shop is open/closed, according to your default opening hours (i.e. it does not depend upon considerations of category, or minimum order fulfilment times).
e.g. [openinghours_conditional only_if=”closed”]The shop is closed now.[/openinghours_conditional].
Remember that you must exclude pages with conditional content from cacheing plugins.
Further parameters are available to use the hours for a specified shipping method: shipping_method=”(shipping_method_textual_id|default)”, instance_id=”(shipping_zone_instance_id)” (applies only on WC 2.6+).
The following filters (see here, or here for a tutorial) are available for developers to use to customise the plugin “under the hood”, in addition to the normal settings screen in the WP dashboard. (Continue to the bottom of this list for an example).
Note also that the plugin is fully internationalised, and you can add your own translation using any standard tool (e.g. poedit) for creating translations.
-
- openinghours_chooser_position – controls the position that the time/date selector is shown on the checkout page. Strictly, this is the action call to listen for when outputting the selector. It defaults to woocommerce_after_checkout_billing_form.
- openinghours_frontendtext_notcurrentlyopeninfo : The message shown when the order cannot be immediately fulfilled and the customer needs to choose a new time, including an indication of when the next possible time is.
- openinghours_frontendtext_timeavailable : The message to show when a chosen time/date is available.
- openinghours_frontendtext_timenotavailable : The message to show when a chosen time/date is not available.
- openinghours_notcurrentlyopenerror : The message to show when the shop is not currently open.
- openinghours_shopsubjectnoun : The noun to use for describing the shop – e.g. “restaurant”, “take-away”; (defaults to “shop”). This value is then used in various of the following messages.
- openinghours_frontendtext_currentlyclosedinfo : The advisory message to show when the shop is currently closed. Defaults to “This order cannot be fulfilled immediately; but you will be able to choose a time for later fulfilment.”
- openinghours_frontendtext_timeneeded : Defaults to “Please choose a delivery time.”
- openinghours_frontendtext_timeinvalid : The message shown when an invalid time has been chosen. Defaults to “The delivery time you have chosen is not available; please choose again.”
- openinghours_label_timechosen : The label shown for a chosen time; defaults to “Time chosen”. Used on both the front-end and the back-end.
- openinghours_label_datechosen : The label shown for a chosen date (if in date-only mode); defaults to “Date chosen”. Used on both the front-end and the back-end.
- openinghours_printout_timechosen : The label shown for a chosen time on PDFs and print-outs (with appropriate plugins); defaults to “Time chosen”
- openinghours_printout_datechosen : The label shown for a chosen date on PDFs and print-outs (if in date-only mode) (with appropriate plugins); defaults to “Date chosen”
- openinghours_frontendtext_choiceplaceholder : The placeholder for the field in which a time is entered; defaults to “Enter a time to deliver after”
- openinghours_frontendtext_closedforholiday : The text shown when the time chosen is a holiday – defaults to “We are closed on this day.”
- openinghours_frontendtext_closedday : The text shown when the time chosen is on a day of the week when the shop is closed. Defaults to “We do not open on this day of the week.”
- openinghours_frontendtext_open_but_unavailable_day: The text shown when the time chosen is on a day of the week when the shop has available hours, but all available slots have been used (i.e. your configured limits have been matched by existing orders). Defaults to “This day was available, but has gone now due to existing orders.”
- openinghours_notcurrentlyopeninformation : The text shown when the customer is being allowed to check-out, but being advised that the shop is currently closed and that deliveries will not be made until it opens. Defaults to “The shop is not currently open; your order will be fulfilled once we open.”
- openinghours_timepickerformat: The time format to be used in the front-end timepicker. See here for a list of valid formats.
- openinghours_timepickercontroltype: The control type to use for choosing the time. By default it is ‘slider’, but you can also choose ‘select’ to use a drop-down instead, or ‘hourminuteslot’ for a single drop-down based upon slots.
- openinghours_next_opening_time: Use this to over-ride when the next opening time (relative to now) is.
- openinghours_frontend_initialvalue: Over-ride the initial value filled in in the checkout form field.
- openinghours_frontend_initialvalue_formethod: Over-ride the initial value filled in in the checkout form field for a particular shipping method (which is the second parameter passed to the filter).
- openinghours_date_only: Defaults to false; set this to ‘true’ if you wish the ‘time’ element to be dropped from the checkout date/time picker, and for only a date to be chosen.
- openinghours_nextavailableat: Message to advise the customer when a particular shipping method is next available; defaults to “This delivery method ((method)) is next available at:”
- Used to advise the customer that a particular delivery method is not currently available; defaults to: “The time you have chosen is not available for the chosen delivery method ((method)); please choose again.”
- openinghours_forced_time: When openinghours_date_only is filtered to true, for the purposes of working out whether the chosen time is available (where relevant), the assumed chosen time defaults to 12:00 (i.e. mid-day). To change this, use this filter, and pass your results back in the format array($hour, $min). This allows you, for example, to force selection of tomorrow as the earliest available day, if it is too late in the day today.
- openinghours_jquery_ui_url: Use this to over-ride the URL used for the jQuery CSS style-sheet.
- openinghours_datetimepickerstepminute: The number of minutes to use for steps in the time-picked widget (defaults to: 5)
- openinghours_datepickerformat_oneline: Set this to true (default: false) to use the timepicker’s “one line” style. To use this you must also set the control type (using the openinghours_timepickercontroltype filter) to ‘select’.
- openinghours_frontendtext_choicelabel: This text is used to ask the customer to choose a time/date. Its default depends upon the plugin’s settings (usually “Choose your order fulfilment time”, perhaps preceded by “This order cannot be immediately fulfilled.”)
- openinghours_choose_soonest_time_on_shipping_method_switch: By default, if the customer changes shipping method at the checkout, then the chosen time will not be changed if it is still valid. However, if you prefer to automatically change the time to the soonest available, then change this to true (default is false).
- openinghours_category_message_prefer_parent_to_child: If a product is not available because of being in multiple nested categories which are both restricted, then this filter helps to choose which category’s message will be shown. If set to true, then it will choose the parent’s category message; if false (the default), then the child’s.
- openinghours_category_message: This filter allows advanced/arbitrary control over the ‘category forbidden’ message. The parameters passed are the chosen message, any array of matching category messages keyed by category ID, and an array of IDs of parent categories, keyed by category ID.
- openinghours_multiple_category_handling: This filter controls how a decision is made about product availability if it is multiple categories with time restrictions. If set to ‘anyopen’ (default) then it requires availability in just one category; if ‘anyclosed’ then it requires availability in them all; ‘parent’ is suitable for shops where multiple categories only occur with nested hierarchies, and causes the parent’s times to be preferred; similarly ‘child’ for the child.
- openinghours_wpo_wcpdf_footer: This filter can be used to adjust (or remove) the text that gets added to the footer of an invoice from the PDF Packing Slips & Invoicing Plugin
- openinghours_timepickercontroltype: Use this to over-ride the setting for the time-picker control type to use. Valid string values are: slider, select, hourminuteslot
- openinghours_slot_dropdown_show_end: if an “hour/minute slot” selector widget is used, then setting this to false will prevent the end of the slot time being shown, e.g. “21:00 -” instead of “21:00 – 21:30”
- openinghours_check_cart_items: This filter is called when the cart is being checked either at the cart page, the checkout, or processing the checkout. If you return true to it, then no notices or errors will be shown – i.e. it will short-circuit all other checks.
- openinghours_wpo_wcpdf_template_position: This filter affects the position that the chosen time is added to the template in the WooCommerce PDF Packaging Slips and Invoices plugin. It defaults to: wpo_wcpdf_footer . To know what other values are valid, you will need to read the code of your chosen template from that plugin.
- openinghours_next_opening_time_with_gap : Allows a developer to over-ride the calculation of the next available time, taking into account minimum fulfilment times.
- openinghours_pickertext_no_choices_available: This is the message shown when a shipping method is chosen which has no available hours at all (e.g. can only place same-day orders, and the last time is past) – defaults to “(You cannot place an order now using this shipping method)”
- openinghours_mingap_from_options: Allows a developer to over-ride the calculation of the minimum fulfilment time.
- openinghours_checkout_field_type
: If you change this from the default of “text” to “inline”, then the widget will be rendered directly on the page, instead of only showing when the field is clicked. Or if you supply any other value, then the action openinghours_checkout_render_(value) is called, allowing you to render it how you wish (but of course, unless you remain within the conventions expected elsewhere in the plugin, it will not necessarily work).
-
- openinghours_order_uses_slot:
– a boolean which indicates whether, for a given order, it should be counted as using a slot. By default, this is determined by whether its order status is something other than cancelled.
An example using the openinghours_label_timechosen filter: call this file anything-you-like.php and place it in wp-content/mu-plugins (you may need to create the mu-plugins directory if it does not yet exist):
<?php
add_filter('openinghours_label_timechosen', 'my_openinghours_label_timechosen');
function my_openinghours_label_timechosen($m) { return "Your chosen time"; }
From $63.13 (you can pay in GB pounds sterling, euros or US dollars) / 12 months
Information for Developers
Firstly, please note that standard plugin support does not include hands-on assistance with customisations to the plugin that involve writing PHP code. There is an example, and links to tutorials, below. If you need to hire a developer to implement a PHP-based customisation, then we recommend Codeable, a marketplace of many WordPress/PHP developers who are available at good rates.
A shortcode, [openinghours_conditional only_if=”(open|closed)”], is available. Content contained inside the opening and shortcode tags will only render if the shop is open/closed, according to your default opening hours (i.e. it does not depend upon considerations of category, or minimum order fulfilment times).
e.g. [openinghours_conditional only_if=”closed”]The shop is closed now.[/openinghours_conditional].
Remember that you must exclude pages with conditional content from cacheing plugins.
Further parameters are available to use the hours for a specified shipping method: shipping_method=”(shipping_method_textual_id|default)”, instance_id=”(shipping_zone_instance_id)” (applies only on WC 2.6+).
The following filters (see here, or here for a tutorial) are available for developers to use to customise the plugin “under the hood”, in addition to the normal settings screen in the WP dashboard. (Continue to the bottom of this list for an example).
Note also that the plugin is fully internationalised, and you can add your own translation using any standard tool (e.g. poedit) for creating translations.
-
- openinghours_chooser_position – controls the position that the time/date selector is shown on the checkout page. Strictly, this is the action call to listen for when outputting the selector. It defaults to woocommerce_after_checkout_billing_form.
- openinghours_frontendtext_notcurrentlyopeninfo : The message shown when the order cannot be immediately fulfilled and the customer needs to choose a new time, including an indication of when the next possible time is.
- openinghours_frontendtext_timeavailable : The message to show when a chosen time/date is available.
- openinghours_frontendtext_timenotavailable : The message to show when a chosen time/date is not available.
- openinghours_notcurrentlyopenerror : The message to show when the shop is not currently open.
- openinghours_shopsubjectnoun : The noun to use for describing the shop – e.g. “restaurant”, “take-away”; (defaults to “shop”). This value is then used in various of the following messages.
- openinghours_frontendtext_currentlyclosedinfo : The advisory message to show when the shop is currently closed. Defaults to “This order cannot be fulfilled immediately; but you will be able to choose a time for later fulfilment.”
- openinghours_frontendtext_timeneeded : Defaults to “Please choose a delivery time.”
- openinghours_frontendtext_timeinvalid : The message shown when an invalid time has been chosen. Defaults to “The delivery time you have chosen is not available; please choose again.”
- openinghours_label_timechosen : The label shown for a chosen time; defaults to “Time chosen”. Used on both the front-end and the back-end.
- openinghours_label_datechosen : The label shown for a chosen date (if in date-only mode); defaults to “Date chosen”. Used on both the front-end and the back-end.
- openinghours_printout_timechosen : The label shown for a chosen time on PDFs and print-outs (with appropriate plugins); defaults to “Time chosen”
- openinghours_printout_datechosen : The label shown for a chosen date on PDFs and print-outs (if in date-only mode) (with appropriate plugins); defaults to “Date chosen”
- openinghours_frontendtext_choiceplaceholder : The placeholder for the field in which a time is entered; defaults to “Enter a time to deliver after”
- openinghours_frontendtext_closedforholiday : The text shown when the time chosen is a holiday – defaults to “We are closed on this day.”
- openinghours_frontendtext_closedday : The text shown when the time chosen is on a day of the week when the shop is closed. Defaults to “We do not open on this day of the week.”
- openinghours_frontendtext_open_but_unavailable_day: The text shown when the time chosen is on a day of the week when the shop has available hours, but all available slots have been used (i.e. your configured limits have been matched by existing orders). Defaults to “This day was available, but has gone now due to existing orders.”
- openinghours_notcurrentlyopeninformation : The text shown when the customer is being allowed to check-out, but being advised that the shop is currently closed and that deliveries will not be made until it opens. Defaults to “The shop is not currently open; your order will be fulfilled once we open.”
- openinghours_timepickerformat: The time format to be used in the front-end timepicker. See here for a list of valid formats.
- openinghours_timepickercontroltype: The control type to use for choosing the time. By default it is ‘slider’, but you can also choose ‘select’ to use a drop-down instead, or ‘hourminuteslot’ for a single drop-down based upon slots.
- openinghours_next_opening_time: Use this to over-ride when the next opening time (relative to now) is.
- openinghours_frontend_initialvalue: Over-ride the initial value filled in in the checkout form field.
- openinghours_frontend_initialvalue_formethod: Over-ride the initial value filled in in the checkout form field for a particular shipping method (which is the second parameter passed to the filter).
- openinghours_date_only: Defaults to false; set this to ‘true’ if you wish the ‘time’ element to be dropped from the checkout date/time picker, and for only a date to be chosen.
- openinghours_nextavailableat: Message to advise the customer when a particular shipping method is next available; defaults to “This delivery method ((method)) is next available at:”
- Used to advise the customer that a particular delivery method is not currently available; defaults to: “The time you have chosen is not available for the chosen delivery method ((method)); please choose again.”
- openinghours_forced_time: When openinghours_date_only is filtered to true, for the purposes of working out whether the chosen time is available (where relevant), the assumed chosen time defaults to 12:00 (i.e. mid-day). To change this, use this filter, and pass your results back in the format array($hour, $min). This allows you, for example, to force selection of tomorrow as the earliest available day, if it is too late in the day today.
- openinghours_jquery_ui_url: Use this to over-ride the URL used for the jQuery CSS style-sheet.
- openinghours_datetimepickerstepminute: The number of minutes to use for steps in the time-picked widget (defaults to: 5)
- openinghours_datepickerformat_oneline: Set this to true (default: false) to use the timepicker’s “one line” style. To use this you must also set the control type (using the openinghours_timepickercontroltype filter) to ‘select’.
- openinghours_frontendtext_choicelabel: This text is used to ask the customer to choose a time/date. Its default depends upon the plugin’s settings (usually “Choose your order fulfilment time”, perhaps preceded by “This order cannot be immediately fulfilled.”)
- openinghours_choose_soonest_time_on_shipping_method_switch: By default, if the customer changes shipping method at the checkout, then the chosen time will not be changed if it is still valid. However, if you prefer to automatically change the time to the soonest available, then change this to true (default is false).
- openinghours_category_message_prefer_parent_to_child: If a product is not available because of being in multiple nested categories which are both restricted, then this filter helps to choose which category’s message will be shown. If set to true, then it will choose the parent’s category message; if false (the default), then the child’s.
- openinghours_category_message: This filter allows advanced/arbitrary control over the ‘category forbidden’ message. The parameters passed are the chosen message, any array of matching category messages keyed by category ID, and an array of IDs of parent categories, keyed by category ID.
- openinghours_multiple_category_handling: This filter controls how a decision is made about product availability if it is multiple categories with time restrictions. If set to ‘anyopen’ (default) then it requires availability in just one category; if ‘anyclosed’ then it requires availability in them all; ‘parent’ is suitable for shops where multiple categories only occur with nested hierarchies, and causes the parent’s times to be preferred; similarly ‘child’ for the child.
- openinghours_wpo_wcpdf_footer: This filter can be used to adjust (or remove) the text that gets added to the footer of an invoice from the PDF Packing Slips & Invoicing Plugin
- openinghours_timepickercontroltype: Use this to over-ride the setting for the time-picker control type to use. Valid string values are: slider, select, hourminuteslot
- openinghours_slot_dropdown_show_end: if an “hour/minute slot” selector widget is used, then setting this to false will prevent the end of the slot time being shown, e.g. “21:00 -” instead of “21:00 – 21:30”
- openinghours_check_cart_items: This filter is called when the cart is being checked either at the cart page, the checkout, or processing the checkout. If you return true to it, then no notices or errors will be shown – i.e. it will short-circuit all other checks.
- openinghours_wpo_wcpdf_template_position: This filter affects the position that the chosen time is added to the template in the WooCommerce PDF Packaging Slips and Invoices plugin. It defaults to: wpo_wcpdf_footer . To know what other values are valid, you will need to read the code of your chosen template from that plugin.
- openinghours_next_opening_time_with_gap : Allows a developer to over-ride the calculation of the next available time, taking into account minimum fulfilment times.
- openinghours_pickertext_no_choices_available: This is the message shown when a shipping method is chosen which has no available hours at all (e.g. can only place same-day orders, and the last time is past) – defaults to “(You cannot place an order now using this shipping method)”
- openinghours_mingap_from_options: Allows a developer to over-ride the calculation of the minimum fulfilment time.
- openinghours_checkout_field_type
: If you change this from the default of “text” to “inline”, then the widget will be rendered directly on the page, instead of only showing when the field is clicked. Or if you supply any other value, then the action openinghours_checkout_render_(value) is called, allowing you to render it how you wish (but of course, unless you remain within the conventions expected elsewhere in the plugin, it will not necessarily work).
-
- openinghours_order_uses_slot:
– a boolean which indicates whether, for a given order, it should be counted as using a slot. By default, this is determined by whether its order status is something other than cancelled.
An example using the openinghours_label_timechosen filter: call this file anything-you-like.php and place it in wp-content/mu-plugins (you may need to create the mu-plugins directory if it does not yet exist):
<?php
add_filter('openinghours_label_timechosen', 'my_openinghours_label_timechosen');
function my_openinghours_label_timechosen($m) { return "Your chosen time"; }
Reviews
There are no reviews yet.