Shortcodes Included with Delivery Slots
WooCommerce Delivery Slots comes with a variety of shortcodes you can use to display different elements within your store. We’ve outlined each of these below.
Display the reservation calendar
Use this shortcode to display the reservation calendar:
[iconic-wds-reservation-table]
Arguments:
- shipping_method (optional): When this argument is added, the first 2 steps i.e. shipping address and shipping method will be skipped. Users will be asked to select a date and time only. Example:
[iconic-wds-reservation-table shipping_method='free_shipping:4']
More information about this shortcode can be found here.
Display a reserved time slot
This shortcode displays the customers’ currently reserved time slot:
[iconic-wds-reserved-slot]
Display the lead time for a product
WooCommerce Delivery Slots provides you an option to select the lead time for a product or its categories.
You can use this shortcode to display the lead time for a product:
[iconic-wds-lead-time]
Arguments:
- product_id (optional): The product for which you want to display the lead time. If omitted it will try to fetch the lead time of the current product if used in a single product page. Example:
[iconic-wds-lead-time product_id='55']
Display allowed days for a product
Similar to lead time, you can also specify allowed days for a product or category. This shortcode will display the allowed days for a product:
[iconic-wds-allowed-days]
Argument:
- product_id (optional): The product for which you want to display the allowed days. If omitted it will try to fetch the allowed days of the current product if used on a single product page. Example:
[iconic-wds-lead-time product_id='55']
Display selected Date and Time for an order
You can use this shortcode to display the selected date or time for an Order ID.
[iconic-wds-get-order-date]
– Display only date.
[iconic-wds-get-order-time]
– Display only time.
[iconic-wds-get-order-date-time]
– Display both date and time.
Arguments:
- id: Order ID. Example:
[iconic-wds-get-order-date id='4005']
Manually place delivery slot fields on the checkout page
When designing the checkout page using page builders, you have the option to manually place the Delivery fields anywhere on the checkout page by using this shortcode.
[iconic-wds-fields]
WooCommerce Delivery Slots
Choose a delivery date and time for each order. Add a limit to the number of allowed reservations, restrict time slots to specific delivery methods, and so much more.
Was this helpful?
Please let us know if this article was useful. It is the best way to ensure our documentation is as helpful as possible.