The free edition applies no filters or actions of its own. The hooks under Filters and Actions are the full edition's. Storage is shared.
Storage
| What | Name | Notes |
|---|---|---|
| Settings option | gmde_settings |
min_days, max_days (strings, '' = not set), cutoff (HH:MM or ''), working_days ("1,2,3,4,5", Sunday = 0), and — full edition — holidays (newline list of Y-m-d), date_format, placements ("product,cart,checkout"), wording |
| Product meta | _gmde_min_days, _gmde_max_days |
Absent = follow the category / shop. "0" = same day. |
| Category term meta | _gmde_min_days, _gmde_max_days |
Full edition reads them. |
| Order meta | _gmde_earliest, _gmde_latest |
Y-m-d, written on woocommerce_checkout_create_order (classic) and woocommerce_store_api_checkout_update_order_from_request (Checkout block). |
| Licence | gmde_license |
Full edition. |
No tables, no cron jobs (other than the full edition's licence check, gmde_license_check), no outside requests.
Reading the promise on an order
$order = wc_get_order( $order_id );
$earliest = $order->get_meta( '_gmde_earliest' ); // "2026-03-18"
$latest = $order->get_meta( '_gmde_latest' );
Filters — Full edition
gmde_lead_time
A product's lead time, after the product → category → shop decision.
| Argument | Type | |
|---|---|---|
$range |
array|null |
[ min_days, max_days ], or null for no estimate |
$product |
WC_Product|null |
The product asked about |
Return null to show no estimate for that product. The result is cleaned: negatives become 0 and a maximum below the minimum becomes the minimum. The cart's estimate is built from this filter for each line, so a change here applies to the product page, the cart, the checkout and the recorded order alike.
// Add three working days while the supplier is away.
add_filter( 'gmde_lead_time', function ( $range, $product ) {
if ( null === $range || ! $product ) {
return $range;
}
if ( has_term( 'supplier-x', 'product_tag', $product->get_parent_id() ?: $product->get_id() ) ) {
$range[0] += 3;
$range[1] += 3;
}
return $range;
}, 10, 2 );
gmde_estimate_text
The sentence a shopper reads, after the wording and date format are applied.
| Argument | Type | |
|---|---|---|
$text |
string |
The sentence |
$dates |
DateTimeImmutable[] |
[ earliest, latest ], in the site's time zone |
The text is escaped when printed; return plain text.
add_filter( 'gmde_estimate_text', function ( $text, $dates ) {
return $text . ' — order before 3pm for the earliest date.';
}, 10, 2 );
gmde_settings
The merged settings array on every read.
gmde_modules
The ordered module list. For tests and debugging.
Licensing
gmde_license_api_url, gmde_update_cache_ttl (12 hours), gmde_update_retry_ttl (15 minutes), gmde_sync_cache_ttl (12 hours).
Actions — Full edition
gmde_booted
Fires once modules have booted, with the service container. Service ids include settings, lead_times, estimator and renderer.
add_action( 'gmde_booted', function ( $c ) {
$dates = $c->get( 'estimator' )->for_product( 123 ); // null or [ earliest, latest ]
$html = $c->get( 'renderer' )->render( $dates );
} );
Shortcode — Full edition
[gatemi_delivery_estimate] — the estimate for the current product. [gatemi_delivery_estimate product="123"] — for product 123. Prints nothing when there is no estimate.
Markup and CSS
Every surface prints the same markup:
<p class="gmde-estimate">
<time class="gmde-estimate-date" datetime="2026-03-18">Arrives between 18 March 2026 and 20 March 2026</time>
</p>
| Class | |
|---|---|
.gmde-estimate |
The paragraph |
.gmde-estimate-date |
The <time> element; datetime is the earliest date |
The stylesheet (gmde) is enqueued in the footer only on a page where an estimate was printed. Plain-text emails get the sentence without markup.
WooCommerce hooks used
| Hook | Surface |
|---|---|
woocommerce_single_product_summary (25) |
Product page |
woocommerce_cart_totals_before_order_total |
Classic cart |
woocommerce_review_order_before_order_total |
Classic checkout |
woocommerce_checkout_create_order, woocommerce_store_api_checkout_update_order_from_request |
Records the two dates (classic, block) |
render_block_woocommerce/cart, render_block_woocommerce/checkout (filters) |
The estimate after the Cart and Checkout blocks |
woocommerce_order_details_after_order_table |
Order received, My Account |
woocommerce_email_order_details (20) |
Emails |
Uninstall
- Full edition: deletes
gmde_settings,gmde_license, the update transient and the licence cron event, and every product's_gmde_min_days/_gmde_max_days(delete_post_meta_by_key()), and the same two keys on every product category (delete_metadata( 'term', … )). - Free edition: the same settings and product meta, and nothing at all if
gmde_licenseexists. - Order meta (
_gmde_earliest,_gmde_latest) is never removed.
