Gatemi My Account Developer Reference

Read from the plugin code. The free edition is plain WordPress PHP (GMMAF_* classes); the full edition is namespaced (GatemiMyAccount).

Filters — Full edition

Filter Arguments What it changes
gmma_reserved_endpoints array $slugs The addresses a custom tab may not use. Starts with WooCommerce's account endpoints plus the store's configured endpoint names.
gmma_settings array $settings The settings (menu_icons, dashboard_top, capability) after defaults.
gmma_modules array $modules The module list the plugin boots.
gmma_license_api_url string $url The gatemi.com licensing endpoint.
gmma_update_cache_ttl int $seconds How long the update payload is cached.

The free edition applies no filters of its own.

Example: reserve an address another plugin will use

add_filter( 'gmma_reserved_endpoints', function ( $slugs ) {
	$slugs[] = 'my-courses';
	return $slugs;
} );

Actions — Full edition

gmma_booted fires after every module has booted, with the plugin's container.

WooCommerce hooks used (both editions)

Hook Priority Purpose
woocommerce_account_menu_items 20 Applies the patch: labels, order, hidden tabs, your own tabs.
woocommerce_account_menu_item_classes 10 Adds gmma-item and gmma-item--{key}.
woocommerce_account_menu_item_classes 20 Full edition, with icons on: adds gmma-has-icon, and dashicons-before plus the icon class for a Dashicons icon.
woocommerce_account_{slug}_endpoint 10 Prints your own tab's content.
woocommerce_account_dashboard 5 Full edition: prints the dashboard note.
init 20 Registers your own tabs as rewrite endpoints (`EP_ROOT
query_vars 10 Adds your tabs' slugs as query vars.

To change the menu after this plugin, filter woocommerce_account_menu_items at a priority above 20:

add_filter( 'woocommerce_account_menu_items', function ( $items ) {
	// Runs after Gatemi My Account's patch.
	unset( $items['customer-logout'] );
	$items['customer-logout'] = __( 'Sign out', 'my-theme' );
	return $items;
}, 30 );

Options

Option Edition Holds
gmma_items Both Per tab key: label, icon, hidden (bool), position (int), roles (array of role keys).
gmma_endpoints Both A list of your own tabs: slug, label, icon, content, page_id, position, roles. Sorted by position.
gmma_settings Full menu_icons (yes), dashboard_top (HTML), capability (manage_woocommerce).
gmma_endpoint_hash Full Fingerprint of the tab addresses, to flush rewrite rules once.
gmmaf_endpoint_hash Free The same, for the free edition.
gmma_license Full Licence state.

Transients: gmma_refused_slugs (full) and gmmaf_refused_slug (free) carry a refused address to the screen for 60 seconds after saving.

Both options are normalized every time they are read: unknown keys dropped, a reserved or duplicate slug removed, an icon reduced to a Dashicons class or four characters of plain text.

CSS classes

Class Where
.gmma-item Every account menu item
.gmma-item--{key} One menu item, for example .gmma-item--orders or .gmma-item--trade-prices
.gmma-has-icon Full edition: an item with an icon
.gmma-dashboard-top Full edition: the dashboard note wrapper

These names are the same in both editions, so CSS you write keeps working after an upgrade. The full edition's stylesheet is assets/css/account.css, loaded on account pages only while icons are on; the free edition loads no storefront stylesheet.

What it does not have

No database tables, no REST routes, no shortcodes of its own, no storefront JavaScript, and no user, order or product meta.

Shopping Cart
Scroll to Top