GT Extensions hooks into Fluent Cart’s filter and action system. This reference lists every hook the plugin registers, organized by module.
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. All seven modules hook into this at priority 10 (Hide Price Until Login at priority 5) to add their respective data to the variation object.
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/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
fluent_cart/product/buy_now_button_text
Filters the Buy Now button text.
- Custom Add to Cart Text (priority 10) — Returns custom text
Stock Availability
fluent_cart/product_stock_availability
Filters stock availability data.
- Stock Urgency Labels — Adds urgency level and message
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';
} );
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 Sold Count, Quantity Limits, Multi-Currency, and Custom Cart Text 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
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 | Purpose: Currency display
- 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
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.