Gatemi Pick & Pack Developer Reference

The free edition applies no filters or actions of its own. Everything under Filters and Actions is the full edition's.

Filters — Full edition

gmpp_pick_lines

The pooled pick list after it is built and sorted, before grouping.

Argument Type
$lines array Rows: product_id, variation_id, name, sku, location, category, quantity, orders (order numbers)
$orders WC_Order[] The orders in the document

Must return an array.

// Leave gift cards off the pick list.
add_filter( 'gmpp_pick_lines', function ( $lines ) {
	return array_values( array_filter( $lines, function ( $line ) {
		return ! has_term( 'gift-cards', 'product_cat', $line['product_id'] );
	} ) );
} );

gmpp_pack_lines

One order's packing-slip lines.

Argument Type
$lines array Rows: name, sku, location, quantity, total (line subtotal including tax)
$order WC_Order The order

gmpp_location

One product's shelf location, after the variation → product fallback.

Argument Type
$location string The stored location, or ''
$product WC_Product|null The product or variation
// Read locations from another inventory plugin's meta instead.
add_filter( 'gmpp_location', function ( $location, $product ) {
	return $location ?: (string) get_post_meta( $product->get_id(), '_bin', true );
}, 10, 2 );

gmpp_documents

The document vocabulary. Each entry is keyed by its kind and has label, action (the bulk-action text) and per_order (bool). Adding a kind adds a bulk action called gmpp_{kind}.

gmpp_render_document

Renders the body of a kind the plugin does not draw itself (anything other than pick and pack). Arguments: $html (''), $kind, $orders. Return the markup for the document's body. Pair it with gmpp_documents to add your own document.

gmpp_settings

The merged settings array. Must return an array.

gmpp_modules, gmpp_license_api_url, gmpp_update_cache_ttl

The module list, the gatemi.com licensing endpoint (for staging mirrors) and the update payload's cache time in seconds.

Actions — Full edition

gmpp_booted

Fires once the plugin's modules have booted, with the service container.

The print route

Both editions answer the same request on admin_init:

/wp-admin/admin.php?page=gmpp-print&gmpp_doc=pick&gmpp_orders=101,102,103&gmpp_total=3&_wpnonce=…

The page value is gmpp-print in the full edition and gmppf-print in the free edition; the request is recognised by gmpp_doc, so either opens under either edition.

Arg Meaning
gmpp_doc pick or pack (or a kind added through gmpp_documents)
gmpp_orders Comma-separated order ids, capped at the batch size
gmpp_total How many orders were ticked; both editions print how many were left out when it exceeds the batch
_wpnonce Nonce for the action gmpp_print

The request needs edit_shop_orders and a valid nonce. The response is the whole page, with noindex, nofollow and no-cache headers.

Storage

Where Key Edition
Option gmpp_settings — sort, group, prices, sku, heading, footer, batch Both (free reads sort and sku)
Product / variation meta _gmpp_location Full
Option gmpp_license Full
Transient gmpp_update_payload Full
Cron gmpp_license_check Full

No tables, no order meta, no generated files.

CSS classes

The stylesheet is assets/css/print.css, the same rules in both editions, so your own print overrides apply to either.

Class Element
gmpp-doc, gmpp-doc--pick, gmpp-doc--pack <body>
gmpp-toolbar The bar above the document (hidden when printing)
gmpp-sheet, gmpp-sheet--break One sheet; slips break onto a new page
gmpp-head, gmpp-store, gmpp-own, gmpp-meta The heading block
gmpp-table, gmpp-col-tick, gmpp-tick, gmpp-col-qty The table
gmpp-location, gmpp-orders, gmpp-group Pick-list cells and category headings
gmpp-address, gmpp-note, gmpp-footer, gmpp-empty Slip address, customer note, foot line, empty state
Shopping Cart
Scroll to Top