Skip to content
Gaurav TiwariDocs

GT Extensions for FluentCart Hooks and Filters Reference

Updated October 17, 2026

Use WordPress hooks to adapt a specific behavior without editing the plugin’s files. A filter returns a modified value; an action observes an event or performs follow-up work.

Choose the smallest supported extension point for the task. Payment validation, invoice state and delivery capacity should remain in the normal server workflow rather than being replaced by a browser-only customization.

Plugin Extension Points

These hooks are defined by GT Extensions itself.

  • gt_extensions_fluentcart/free_price_text filters the replacement text for zero prices.
  • gt_extensions_fluentcart/free_price_text/load_assets permits assets for a custom template outside the detected commerce surfaces.
  • gt_extensions_fluentcart/sold_count receives the count and product ID for a custom count source.
  • gt_extensions_fluentcart/external_product_redirect receives destination URL, product ID and variation ID before the supported legacy external redirect.
  • gtfc/multi_currency/gateway_capabilities filters the gateway capability hints shown in settings.
  • gtfc/multi_currency/location_country filters the detected country with its context.
  • gtfc/multi_currency/location_currency filters the mapped currency and country.
  • gtfc/multi_currency/load_frontend_assets provides an explicit asset-loading override for legacy or custom integrations.
  • gtfc_checkout_cache_buster_enabled filters whether the cache-buster behavior is enabled.
  • gtfc/invoice_cart_created receives the native cart created for an invoice.

Example: Change the Free Label

Put a small customization in an appropriate site plugin or managed snippet, then check a zero-price product.

add_filter('gt_extensions_fluentcart/free_price_text', function ($text) {
    return 'Complimentary';
});

This changes the display label. It does not change the numeric product price or bypass checkout.

Native FluentCart Integration

GT Extensions also attaches to FluentCart’s own hooks. These are useful landmarks when tracing a behavior in source.

  • Price display uses fluent_cart/single_product/variation_price and fluent_cart/cart/estimated_total.
  • Sold-count, stock and quantity messages use fluent_cart/product/after_price.
  • Quantity limits and restricted purchasing use fluent_cart/cart/can_purchase.
  • Button labels use fluent_cart/product/add_to_cart_text and fluent_cart/product/buy_now_text.
  • Checkout price conversion uses native cart pricing and checkout validation hooks.
  • Add-ons use fluent_cart/cart/fees for native fee handling.
  • Wishlists and stock alerts render beside supported single-product actions.
  • Saved carts register a native customer-portal endpoint and menu item.
  • Service products integrate with product saving, receipt instructions and the digital-order completion decision.

Keep Customizations Maintainable

Preserve argument counts and return types. Pass an existing WP_Error through a validation filter instead of overwriting another check’s failure. Keep network calls and large queries out of frequently rendered price filters where possible.

Frontend files are generated from the asset source and served minified. Run npm run build after changing JavaScript or CSS in a development copy; do not edit only a generated file. For request-based integrations, use the REST reference. The REST namespace and code identifiers in these lessons are interface names, not a release requirement.

Share

Was this helpful?

Still stuck? Open a support ticket