Addons

Payment Trust Badge

Displays a reassurance block directly beneath the checkout payment methods showing your accepted providers.

Hook flow

  • PaymentTrustBadgeAddon registers on wp_enqueue_scripts and kitbix_commerce_checkout_after_payment_methods.
  • Assets live in app/Addons/payment_trust_badge/assets/; only the CSS file is loaded to keep markup lightweight.
  • The badge view (views/payment-trust-badge.php) renders a heading plus a single <img> that you configure.
  • Rendering stops if the addon is disabled or no logo_url is configured.

Settings reference

Field Key Description
Badge Title title Optional heading displayed above the logos. Defaults to “Secure checkout powered by trusted providers”.
Logo Image URL logo_url Absolute URL to a horizontal sprite of payment logos. Fallbacks to the bundled SVG if left blank.

Deployment checklist

  1. Enable the addon from Kitbix Commerce → Addons.
  2. Paste your logo sprite URL (ideally an SVG or 2x PNG). Make sure the image background matches the checkout section.
  3. Visit your checkout page ([kitbix_commerce_checkout]) and confirm the badge appears under the payment selector.
  4. Resize the browser to ensure the image scales; the CSS constrains max-width while preserving aspect ratio.
Tip: Store the sprite in your theme or CDN and version the URL so browsers pick up changes immediately.

Troubleshooting

  • No badge? Check AddonRegistry::isEnabled('payment_trust_badge') and verify the checkout page isn’t cached without the localized option.
  • Broken logo path returns nothing because esc_url_raw() sanitizes invalid URLs.
  • Multiple badges? Ensure you do not manually include similar HTML in your checkout template.
Reminder: This addon only runs on checkout pages detected via kitbix_commerce_get_page_id('checkout') or the checkout shortcode. It will not render on custom thank-you pages.