GT Extensions hooks into Fluent Cart’s filter and action system. This reference lists every hook the plugin registers, organized by module.
This hooks reference lists every filter and action GT Extensions registers, organized by module, with the Fluent Cart hooks each one attaches to. It’s the map for extending module behavior or debugging why a price or label renders the way it does.
Fluent Cart Hooks Used
These are hooks defined by Fluent Cart that GT Extensions filters:
Price Display
fluent_cart/single_product/variation_price
Filters the price HTML on single product pages.
Modules using this hook:
- Free Price Text (priority 10), Replaces $0.00 with custom text
- Hide Price Until Login (priority 5), Replaces price with login message
apply_filters( 'fluent_cart/single_product/variation_price', $price_html, $variation, $product );fluent_cart/cart/estimated_total
Filters the estimated cart total display.
- Free Price Text (priority 10), Replaces zero totals with free text
Variation Data
fluent_cart/variation/data
Filters variation data sent to the frontend. Four modules hook into this to add their respective data to the variation object: Custom Add to Cart Text, Min/Max Quantity, and Stock Urgency Labels at priority 10, and Hide Price Until Login at priority 5.
apply_filters( 'fluent_cart/variation/data', $data, $variation, $product );After Price Display
fluent_cart/product/after_price
Action that fires after the price display. Used for injecting badges and labels.
- Sold Count Display (priority 10), Injects sold count badge
- Stock Urgency Labels (priority 15), Injects urgency badge
- Min/Max Quantity (priority 20), Injects quantity limit text
Cart Validation
fluent_cart/cart/validate_add
Filters cart add validation. Returning a WP_Error prevents the item from being added.
- Hide Price Until Login (priority 5), Blocks guests from adding to cart
- Min/Max Quantity (priority 10), Validates quantity against limits
fluent_cart/cart/can_purchase
Filters whether a product can be purchased at all.
- External Product (priority 100), Rejects direct add-to-cart attempts for external products
- Multi-Currency Checkout, Blocks products that cannot be priced in the selected currency when missing-price behavior is set to block
fluent_cart/checkout/validate_before_process
Filters checkout validation right before the order is processed.
- External Product (priority 100), Rejects an external item found in a stale cart
- Multi-Currency Checkout, Re-validates the submitted payment gateway against the currency routing matrix
fluent_cart/cart/validate_update
Filters cart update validation.
- Min/Max Quantity (priority 10), Validates updated quantities
Product Display
fluent_cart/product/show_add_to_cart
Filters whether to show the Add to Cart button.
- Hide Price Until Login (priority 10), Returns
falsefor guests
fluent_cart/product/add_to_cart_text
Filters the Add to Cart button text.
- Custom Add to Cart Text (priority 10), Returns custom text
- External Product (priority 100), Replaces the text for external products
fluent_cart/product/buy_now_text
Filters the Buy Now button text.
- Custom Add to Cart Text (priority 10), Returns custom text
fluent_cart/product/buy_now_button_text
Filters the Buy Now button text on purchase blocks.
- External Product (priority 100), Replaces the text for external products
Stock Availability
fluent-cart/product_stock_availability
Filters stock availability data. Note the hyphenated fluent-cart prefix; this is the one Fluent Cart hook that doesn’t use the underscore form.
- Stock Urgency Labels: Adds urgency level and message
Purchase Blocks (External Product)
The External Product module renders its external link with these Fluent Cart actions, all at priority 90:
fluent_cart/product/group/after_price_block, External button on product cardsfluent_cart/product/single/after_price_block, External button on single product pagesfluent_cart/product/single/after_price_range_block, External button next to price ranges
It also filters fluent_cart/product_admin_items (priority 20) to add the External Product link to Fluent Cart’s product navigation.
Checkout and Cart Pricing (Multi-Currency Checkout)
The Multi-Currency Checkout module is the heaviest hook consumer in the plugin. Beyond fluent_cart/single_product/variation_price and the validation hooks above, it attaches to:
fluent_cart/cart/item_priceandfluent_cart/cart/item_modify, Reprice cart line items in the selected currencyfluent_cart/cart/feesandfluent_cart/cart/shipping_total, Convert fees and shippingfluent_cart/coupon/resolve_coupons, Revalidate coupons after a currency switchfluent_cart/checkout_active_payment_methods, Filter gateways by the currency routing matrixfluent_cart/before_payment_methods(priority 5), Render the checkout currency selectorfluent_cart/checkout/prepare_other_dataandfluent_cart/checkout/form_data_changed, Keep checkout state on the authoritative currencyfluent_cart/cart/cart_data_items_updated, React to server-side cart changesfluent_cart/global_currency_settingandoption_fluent_cart_store_settings, Synchronize Fluent Cart’s formatters with the cart currencyfluent_cart/admin_js_vars, Expose currency data to the Fluent Cart admin for the price-book widgetpre_render_block,render_block_data, andrender_block_fluent-cart/checkout-payment-methods, Resolve currency before WordPress pre-renders dynamic checkout blocks
Store Settings
fluent_cart/store_settings/fields
Filters the store settings fields array. Used by Free Price Text to add its settings to Fluent Cart’s native settings panel.
fluent_cart/store_settings/values
Filters the store settings values.
fluent_cart/store_settings/sanitizer
Filters the sanitizer rules for store settings.
Custom Hooks Defined by GT Extensions
These hooks are defined by GT Extensions for external customization:
gt_extensions_fluentcart/loaded
Action that fires after the plugin initializes all enabled modules.
add_action( 'gt_extensions_fluentcart/loaded', function() {
// Plugin is ready, all modules loaded
} );gt_extensions_fluentcart/sold_count
Filters the sold count for a product before display.
add_filter( 'gt_extensions_fluentcart/sold_count', function( $count, $product_id ) {
// Modify the count, add caching, pull from external source
return $count;
}, 10, 2 );gt_extensions_fluentcart/free_price_text
Filters the free price display text.
add_filter( 'gt_extensions_fluentcart/free_price_text', function( $text ) {
return 'No Charge';
} );gt_extensions_fluentcart/free_price_text/load_assets
Filters whether Free Price Text loads its frontend assets on pages the module didn’t auto-detect as Fluent Cart pages. Return true to force loading on custom templates.
gt_extensions_fluentcart/external_product_redirect
Action that fires immediately before a legacy instant-checkout or modal-checkout request redirects to an external product’s destination.
add_action( 'gt_extensions_fluentcart/external_product_redirect', function( $url, $product_id, $variation_id ) {
// Log the outbound click, fire analytics, etc.
}, 10, 3 );gtfc/multi_currency/gateway_capabilities
Filters the gateway capability hints shown to merchants in the currency routing matrix. Hints never override the merchant’s saved matrix.
gtfc/multi_currency/location_country
Filters the detected two-letter country code used for automatic local currency.
gtfc/multi_currency/location_currency
Filters the country-to-currency mapping result used for automatic local currency.
WordPress Hooks Used
plugins_loaded: Plugin initialization (after dependency check)
admin_menu (priority 9999), Registers admin pages under Fluent Cart menu
admin_enqueue_scripts: Loads admin CSS and JS on GT Extensions pages
wp_enqueue_scripts: Loads frontend assets
wp_head: Outputs inline CSS for all active modules
wp_footer: Outputs inline JavaScript for frontend functionality
rest_api_init: Registers REST API endpoints for the Sold Count, Quantity Limits, Multi-Currency Checkout, Custom Cart Text, and External Product modules
add_meta_boxes: Registers the Custom Button Text meta box on product editor
save_post_fct_product: Saves custom button text meta on product save
admin_post_gtfc_save_external_product: Handles the per-product External Product settings form
init (priority 1), External Product intercepts legacy instant-checkout and modal-checkout links before Fluent Cart creates a cart
pre_set_site_transient_update_plugins: Hooks into WordPress update system for license-based updates
plugins_api: Provides plugin information for the update modal
Frontend JavaScript Events
fluent-cart:variation-changed
Custom event dispatched by Fluent Cart when a product variation is selected. These modules listen for it:
- Stock Urgency Labels: Updates the urgency badge
- Custom Add to Cart Text: Updates button text
- Min/Max Quantity: Updates input constraints
Hook Priority Map
- Priority: 5 | Module: Hide Price Until Login | Purpose: Price hiding (runs first)
- Priority: 10 | Module: Free Price Text | Purpose: Price text replacement
- Priority: 10 | Module: Multi-Currency Checkout | Purpose: Currency-aware price resolution
- Priority: 10 | Module: Sold Count | Purpose: Badge display
- Priority: 10 | Module: Quantity Limits | Purpose: Cart validation
- Priority: 10 | Module: Custom Cart Text | Purpose: Button text
- Priority: 15 | Module: Stock Urgency | Purpose: Urgency badges
- Priority: 20 | Module: Quantity Limits | Purpose: Limit text display
- Priority: 90-100 | Module: External Product | Purpose: Button rendering (90) and purchase text/blocking overrides (100, runs last so it wins for external products)
Lower priority numbers run first. Hide Price Until Login runs at priority 5 to ensure prices are hidden before other modules try to modify them.
Quick answers to common questions:
Can I modify a module’s output without forking the plugin?
Yes; each module’s output passes through documented filters before rendering. The reference lists them per module with parameters, so a small add_filter in your child theme adjusts text, thresholds, or markup safely.
Which Fluent Cart hooks does the plugin rely on?
Price rendering, cart validation, and product display filters in Fluent Cart’s public API. The reference maps each module to its host hooks, useful when diagnosing conflicts with other Fluent Cart add-ons.