Three rules decide everything the plugin draws.
Rule 1: the payment row is your store's own list
Most trust badge plugins ship twenty card logos and let you tick the ones you want. Then a shop advertises a card scheme its checkout does not take, and the shopper finds out at the pay button — the one moment a badge is supposed to help.
This plugin has no list to tick. Each time it draws the row it asks WooCommerce for the payment gateways currently available, and for each one:
- Takes the gateway's own title — the words your checkout already shows, with any markup removed.
- Skips the gateway if the title is empty, because a glyph with nothing beside it looks like a broken image.
- Chooses a neutral glyph from the gateway's id, which does not change when you rename the gateway:
| Glyph | Gateway ids containing |
|---|---|
| Bank | bacs, bank, sepa, ideal, sofort, giropay, eps, p24, becs, ach |
| Cash | cod, cheque, cash, pickup, invoice |
| Wallet | paypal, applepay, apple_pay, googlepay, google_pay, venmo, klarna, afterpay, affirm, alipay, wechat |
| Card | anything else |
The card is the fallback because it is the shape every payment method shares — never wrong the way a guessed logo would be.
Consequences:
- Rename a gateway under WooCommerce → Settings → Payments and the row says the new name.
- Switch a gateway off and it disappears from the row.
- Enable no gateway and there is no payment row at all, rather than an empty strip.
- If neither the seals nor the payment row have anything to show, nothing is drawn — not even an empty box.
Rule 2: nothing is fetched from anybody else
Every glyph is a small inline SVG that ships inside the plugin, drawn with currentColor on a 24×24 grid. So:
- it paints with the page and costs no extra request;
- it works on a server with no outbound network;
- it takes your theme's text colour, or your accent colour;
- no third party sees your shoppers on the page where they type a card number.
The row's stylesheet, badges.css, is registered on every page but only loaded on a page that actually drew a row. A shop showing no badges ships no CSS.
Rule 3: always below the button
The row prints through WooCommerce's own hooks, after the button:
| Placement | Classic page | Block page |
|---|---|---|
| Product | woocommerce_after_add_to_cart_button |
same hook (product pages use it on both) |
| Cart | woocommerce_after_cart_totals |
directly after the Cart block |
| Checkout | woocommerce_review_order_after_submit, under Place order |
directly after the Checkout block |
The Cart and Checkout blocks render in the shopper's browser and offer no hook beneath their buttons. So on a block page the plugin appends the row straight after the block's own markup, through WordPress's render_block_woocommerce/cart and render_block_woocommerce/checkout filters. It is still server-rendered, still after the button, and outside the container the block's script takes over, so it cannot interfere with the checkout.
As on classic pages, there is no row where there is no button to be below: not under the order-received or order-pay page (the Checkout block hands those to WooCommerce's classic templates, which fire no placement hook), and not under an empty Cart block.
The plugin never filters someone else's markup and string-replaces into it, which is what breaks the moment a theme renders its own template.
The honesty check on seals
Each seal is a fact your shop can check for itself. The Secure checkout padlock is the one seal tied to a fact the plugin can check too: it is only drawn when WordPress reports the request as HTTPS (is_ssl()). The check runs when the row is drawn, so a site that loses its certificate stops showing the padlock on the next request.
What the row looks like in HTML
<div class="gmtb gmtb--checkout" style="--gmtb-accent:#2f6f4f">
<p class="gmtb-heading">Shop with confidence</p>
<ul class="gmtb-seals">
<li class="gmtb-seal gmtb-seal--secure"><svg …></svg><span class="gmtb-label">Secure checkout</span></li>
<li class="gmtb-seal gmtb-seal--returns"><svg …></svg><span class="gmtb-label">Easy returns</span></li>
</ul>
<ul class="gmtb-payments">
<li class="gmtb-payment"><svg …></svg><span class="gmtb-label">Credit card</span></li>
<li class="gmtb-payment"><svg …></svg><span class="gmtb-label">Cash on delivery</span></li>
</ul>
</div>
The accent colour, when you set one, rides an inline custom property on the row, so there is no stylesheet generated in the page's head. Every row is passed through wp_kses() over exactly the elements above before it reaches the page.
The shortcode
[gatemi_trust_badges] returns the same row, with the class gmtb--shortcode. It takes no attributes and ignores the placement settings, so it draws wherever you put it.
Caching
The row contains nothing personal and no script, so a page cache can serve it. One thing to know: the payment row reflects the gateways available when the page was generated. If you switch a gateway on or off, clear your page cache so cached product pages update.
What the plugin stores
One option, gmtb_settings. No tables, no post meta, no order meta, no cookie. Uninstalling deletes that option.
