Custom Add to Cart Text

Keyboard shortcuts
  • JNext lesson
  • KPrevious lesson
  • /Search lessons
  • EscClear search

The Custom Add to Cart Text module lets you change the button text on product pages. Instead of the generic “Add to Cart”, you can display context-specific text like “Subscribe Now”, “Pre-Order”, “Get it Free”, or “Reserve Your Spot”.

Why Customize Button Text

The default “Add to Cart” button text doesn’t fit every product type. A subscription product should say “Subscribe”. A pre-order should say “Pre-Order Now”. A free lead magnet should say “Get it Free”. Matching the button text to the product context improves conversion rates.

Enabling the Module

  1. Go to Fluent Cart > GT Extensions.
  2. Toggle on Custom Add to Cart Text.
  3. Configure default text and per-product options.
  4. Click Save Settings.

Settings

Default text values:

  • Default Text — Fallback button text. Default: Add to Cart.
  • Out of Stock Text — Text when product is out of stock. Default: Out of Stock.
  • Variable Text — Text for products with variations before one is selected. Default: Select Options.
  • Free Product Text — Text for products priced at $0. Default: Get it Free.
  • Subscription Text — Text for subscription products. Default: Subscribe.
  • Pre-Order Text — Text for pre-order products. Default: Pre-Order.

Per-product control:

  • Enable Per Product — Allow setting custom text on individual products via the product editor. Default: No.
  • Enable Per Variation — Allow setting custom text on individual variations. Default: No.

Text Selection Priority

When the module determines which text to display, it follows this priority order:

  1. Variation-level custom text (if per-variation is enabled and text is set)
  2. Product-level custom text (if per-product is enabled and text is set)
  3. Out-of-stock text (if the product/variation is out of stock)
  4. Free product text (if the price is $0)
  5. Subscription text (if the product is a subscription type)
  6. Pre-order text (if the product is marked as pre-order)
  7. Default text (fallback)

The first matching rule wins. This means a per-variation custom text overrides everything else, even if the product is free or out of stock.

Setting Per-Product Text

When Enable Per Product is turned on, a meta box appears on the product editor screen:

  1. Edit a product in Fluent Cart > Products.
  2. Find the Custom Button Text meta box.
  3. Enter your custom text for “Add to Cart” and/or “Buy Now” buttons.
  4. Update the product.

Product-level text is stored as post meta:

  • _gtfc_add_to_cart_text — Custom “Add to Cart” text
  • _gtfc_buy_now_text — Custom “Buy Now” text

Setting Per-Variation Text

When Enable Per Variation is turned on:

  1. Edit a product and go to the variations section.
  2. Each variation shows “Add to Cart Text” and “Buy Now Text” fields.
  3. Enter custom text and save. The selection saves via AJAX.

Variation-level text is stored in the variation’s other_info JSON field:

  • add_to_cart_text
  • buy_now_text

How It Works

The module hooks into Fluent Cart’s button text filters:

  • fluent_cart/product/add_to_cart_text (priority 10) — Filters the “Add to Cart” button
  • fluent_cart/product/buy_now_button_text (priority 10) — Filters the “Buy Now” button
  • fluent_cart/product/buy_now_text (priority 10) — Backward compatibility hook

Frontend JavaScript:

The module listens to the fluent-cart:variation-changed event. When a customer selects a different variation, the script:

  1. Reads the variation’s custom text from the localized data
  2. Updates all button selectors on the page
  3. Adds context classes to the container (gtfc-out-of-stock, gtfc-preorder, gtfc-free-product)

This ensures buttons update instantly when switching between variations with different custom text.

REST API

POST /wp-json/gt-extensions-fluentcart/v1/variation/{id}/button-text

Updates the button text for a specific variation. Requires manage_options capability.

Parameters:

  • add_to_cart_text (string)
  • buy_now_text (string)

Integration with Free Price Text

When both modules are active, the Custom Add to Cart Text module automatically uses “Get it Free” for zero-priced products. The Free Price Text module handles the price display while this module handles the button. No extra configuration needed.

Examples

  • Product Type: Digital download | Recommended Text: Download Now
  • Product Type: Subscription | Recommended Text: Subscribe
  • Product Type: Pre-order | Recommended Text: Pre-Order Now
  • Product Type: Free lead magnet | Recommended Text: Get it Free
  • Product Type: Event ticket | Recommended Text: Reserve Your Spot
  • Product Type: Course | Recommended Text: Enroll Now
  • Product Type: Consultation | Recommended Text: Book Now
  • Product Type: Physical product | Recommended Text: Buy Now
  • Product Type: Limited edition | Recommended Text: Claim Yours