The free edition applies no filters or actions of its own. The hooks under Filters and Actions are the full edition's. The settings option, the order meta keys and the field names are shared by both editions.
Storage
gmds_settings
| Key | Default | Edition |
|---|---|---|
enabled |
yes |
both |
required |
yes |
both |
notice_days |
"1" |
both |
window_days |
"21" (1–365) |
both |
cutoff |
"" (HH:MM) |
both |
working_days |
"1,2,3,4,5" (Sunday = 0) |
both |
holidays |
"" (newline list of Y-m-d) |
both |
date_format |
"" |
full |
date_label, slot_label |
"" |
full |
no_date, bad_date, no_slot, slot_gone |
"" |
full |
gmds_slots — Full edition
Slots keyed by id:
| Key | Type | |
|---|---|---|
id |
string |
sanitize_key(); a numeric or empty id becomes slot-N |
label |
string |
|
from, to |
string |
HH:MM, or '' |
days |
int[] |
Weekdays, Sunday = 0; empty = every delivery day |
capacity |
int |
0 = no limit |
enabled |
bool |
{prefix}gmds_bookings — Full edition
| Column | |
|---|---|
id |
Primary key |
order_id |
UNIQUE — one booking per order |
slot_date |
date |
slot_id |
varchar(64) |
booked_at |
UTC datetime |
Index slot_date (slot_date, slot_id). Created with dbDelta() on init, versioned in gmds_db_version.
The claim, for a slot with a limit, is one statement:
INSERT IGNORE INTO wp_gmds_bookings (order_id, slot_date, slot_id, booked_at)
SELECT %d, %s, %s, %s
FROM ( SELECT COUNT(*) AS taken FROM wp_gmds_bookings
WHERE slot_date = %s AND slot_id = %s ) AS c
WHERE c.taken < %d
No row written means the slot was full (or the order already had a row).
Order meta
| Key | Value | Edition |
|---|---|---|
_gmds_date |
Y-m-d |
both |
_gmds_slot |
slot id | full |
_gmds_label |
slot label as shown | full (read by both) |
$order = wc_get_order( $order_id );
$day = $order->get_meta( '_gmds_date' ); // "2026-03-18"
$time = $order->get_meta( '_gmds_label' ); // "Morning"
On the Checkout block, WooCommerce also stores the raw field values under its own keys, _wc_other/gatemi-delivery-slots/date and _wc_other/gatemi-delivery-slots/slot; the plugin copies them into the keys above.
Fields
Classic checkout (name) |
Checkout block (field id) | |
|---|---|---|
| Date | gmds_date |
gatemi-delivery-slots/date |
| Time (full edition) | gmds_slot |
gatemi-delivery-slots/slot |
Block fields are registered on woocommerce_init with woocommerce_register_additional_checkout_field(), location order, type select. The date field is required when required is on; the time field is never required by WooCommerce itself.
Filters — Full edition
gmds_slots
The slots as read, after normalisation. Use it to close a slot for a day from code, for example:
// No evening deliveries in December.
add_filter( 'gmds_slots', function ( $slots ) {
if ( '12' === wp_date( 'm' ) && isset( $slots['evening'] ) ) {
$slots['evening']['enabled'] = false;
}
return $slots;
} );
gmds_settings
The merged settings array on every read.
// Close the calendar for a stock-take week by listing the days.
add_filter( 'gmds_settings', function ( $s ) {
$s['holidays'] .= "n2026-07-06n2026-07-07n2026-07-08";
return $s;
} );
gmds_modules
The ordered module list. For tests and debugging.
Licensing
gmds_license_api_url, gmds_update_cache_ttl (12 hours), gmds_update_retry_ttl (15 minutes), gmds_sync_cache_ttl (12 hours).
gmds_available_dates (full edition) filters the list of days offered, earliest first — the field, the re-check at placement and the claim all read the filtered list. Only Y-m-d strings are kept:
add_filter( 'gmds_available_dates', function ( $dates ) {
return array_values( array_diff( $dates, array( '2026-12-24' ) ) );
} );
Actions — Full edition
gmds_booted
Fires once modules have booted, with the service container. Service ids include settings, calendar, slots and bookings.
add_action( 'gmds_booted', function ( $c ) {
$days = $c->get( 'calendar' )->available_dates(); // [ "2026-03-18", ... ]
$rows = $c->get( 'bookings' )->for_date( '2026-03-18' );
} );
WooCommerce hooks used
| Hook | |
|---|---|
woocommerce_after_order_notes |
Draws the classic fields |
woocommerce_checkout_process |
Re-checks the day (and time) |
woocommerce_checkout_create_order |
Saves the day; full edition claims the slot for an order that already has an id |
woocommerce_checkout_order_created |
Full edition: claims the slot for a new classic-checkout order, once it has an id |
woocommerce_store_api_checkout_update_order_from_request |
The same on the Checkout block |
woocommerce_order_status_cancelled, woocommerce_order_status_refunded |
Full edition: releases the booking |
woocommerce_order_details_after_order_table |
Order received, My Account |
woocommerce_email_order_details (20) |
Emails |
CSS classes
| Class | Element |
|---|---|
.gmds-fields |
Wrapper around the classic fields (id="gmds-fields") |
.gmds-row, .gmds-row--date, .gmds-row--slot |
Each field row |
.gmds-select |
The selects |
.gmds-order, .gmds-order-text |
The delivery line on the order page |
The storefront stylesheet and, in the full edition, the small script that narrows the time list load only on a page where the fields or an order's delivery line were printed.
Uninstall
- Full edition: deletes
gmds_settings,gmds_slots,gmds_db_version,gmds_license, the update transient, the licence cron eventgmds_license_check, and drops{prefix}gmds_bookings. - Free edition: deletes
gmds_settingsonly whengmds_licensedoes not exist. - Order meta is never removed.
