Shared between the editions
| Item | Name |
|---|---|
| Settings option | gmqc_settings — enabled, categories, buy_now, buy_now_label, skip_cart, cart_to_checkout |
| Per-product meta | _gmqc_mode — quick, normal, or absent |
| Posted field | gmqc_buy_now (the Buy now button's name, value 1) |
| WooCommerce hooks | woocommerce_after_add_to_cart_button (the button), woocommerce_add_to_cart_redirect priority 10 (the redirect), woocommerce_product_options_advanced (the product field) |
The redirect looks for gmqc_buy_now in the request. Any add-to-cart form of your own can carry it to get the Buy now behaviour:
<input type="hidden" name="gmqc_buy_now" value="1" />
CSS classes
| Class | Element |
|---|---|
.gmqc-buy-now |
The Buy now button (also button; in the free edition also wp-element-button) |
.gmqc-page, .gmqc-page-product, .gmqc-page-checkout |
Full edition — the one-page checkout's wrapper and its two halves |
.gmqc-page-empty |
Full edition — the note shown in place of the checkout while the cart is empty |
The stylesheet is enqueued from the footer only when a button or a one-page checkout was printed on the page.
.gmqc-buy-now { background: #1e1e1e; color: #fff; }
Free edition
The free edition applies no filters or actions of its own.
Full edition
Shortcode
[gatemi_quick_checkout product="123"] — one product and WooCommerce's checkout on one page. Renders nothing for a missing or unbuyable product.
While the product summary renders, woocommerce_add_to_cart_form_action (priority 99) points the form at the page itself and a hidden gmqc_one_page field carries its address; the add-to-cart redirect sends the add back there when wp_validate_redirect() accepts it, ahead of gmqc_redirect_url. With an empty cart, .gmqc-page-empty (a paragraph) stands where the checkout will be.
Filters
gmqc_applies
Whether one product takes the short route, after the plugin's own decision (product override, shop switch, categories).
| Argument | Type | |
|---|---|---|
$applies |
bool |
The plugin's answer |
$product |
WC_Product |
The product |
// Never offer the short route for products over 500.
add_filter( 'gmqc_applies', function ( $applies, $product ) {
return $applies && (float) $product->get_price() <= 500;
}, 10, 2 );
gmqc_redirect_url
Where a shopper goes after a quick add. Applied only when the plugin is sending them to the checkout.
| Argument | Type | |
|---|---|---|
$checkout |
string |
The checkout URL |
$url |
string |
The URL WooCommerce would have used |
// Send quick buys to a landing page that holds the one-page checkout.
add_filter( 'gmqc_redirect_url', fn() => home_url( '/express/' ) );
gmqc_settings
The merged settings array, after defaults.
gmqc_modules
The module list booted by the plugin.
gmqc_license_api_url, gmqc_update_cache_ttl
The licence API base URL (for staging) and how long the update payload is cached, in seconds.
Actions
gmqc_booted — fires after every module has booted; receives the plugin's service container.
Other storage
| Item | Name |
|---|---|
| Licence | gmqc_license |
| Update cache | transient gmqc_update_payload |
| Cron | gmqc_license_check (only with a key) |
Template redirect
With cart_to_checkout on, a template_redirect callback sends a non-empty cart page to the checkout with wp_safe_redirect(). It does nothing during AJAX or REST requests.
