FREEWebsite & Growth Audit — find out what's slowing your business down
build

Changing Strings – Buy Once or Subscribe for WooCommerce Subscriptions

How to change the default “buy once or subscribe” labels in WooCommerce Subscriptions so your subscription offer — and its discount — is clear to shoppers.

By Tech Pumpkin teamPublished Aug 9, 2023Updated Aug 9, 20233 min read

// quick answer

To change the “buy once or subscribe” text in WooCommerce Subscriptions, add small filters to your child theme or a code snippets plugin. Change the label on the subscription option and the text next to the price, and keep any placeholders — such as the discount value — inside your new text so the saving still shows.

// key points

  • Never edit plugin files — use filters in a child theme or a snippets plugin so updates don’t wipe your changes.
  • Keep placeholders such as the discount value in your new text, or the saving disappears from the page.
  • Show the highest available discount next to the price to make subscribing more attractive.
  • Fall back to a plain “Subscribe” label when a product has no discount.
  • Test on a staging site and clear caches before going live.
// in this article
  1. Why change the default text?
  2. Before you start
  3. Step 1: Change the subscription option label
  4. Step 2: Show the best discount next to the price
  5. A general fallback: translate any plugin string
  6. Test the changes
  7. FAQs

The “buy once or subscribe” option lets shoppers choose between a one-off purchase and a subscription on the same product. The default wording is functional, but it rarely sells the benefit. Changing two strings — the option label and the price text — can make the subscription offer much clearer.

Why change the default text?

Shoppers decide in seconds. A label that just says “Subscribe” does not tell them what they gain. A label such as “Subscribe & Save 10%” states the benefit right where the decision happens. The same applies to the price area: showing the best available saving next to the price nudges more people towards the subscription.

Before you start

  • Use a child theme or a code snippets plugin — never edit the plugin itself.
  • Work on a staging site first and take a backup.
  • Know which text you want to change and where it appears (product page, cart, mini-cart).

Step 1: Change the subscription option label

The first filter changes the text shown on the subscription choice — for example from “Subscribe” to “Subscribe & Save” followed by the discount.

The plugin’s documentation shows the filter to use, but there is a catch we ran into: after adding our custom string, the discount value disappeared. The default label contains a placeholder for the discount, and a replacement string that drops that placeholder drops the number too. The fix is to include the placeholder in your new text.

[original snippet — frequency option label filter, with the discount placeholder kept]

Step 2: Show the best discount next to the price

The second filter looks at all subscription plans on a product, finds the highest discount, and shows it in the price area — for example “or Subscribe & Save 15%”. If no plan has a discount, it simply shows “Subscribe”.

[original snippet — price display filter: highest discount, fallback to “Subscribe”]

A general fallback: translate any plugin string

If a plugin has no dedicated filter for the text you want, WordPress’s gettext filter can replace any translatable string. Limit it to the plugin’s text domain so you don’t change text elsewhere on the site.

add_filter( 'gettext', function ( $translated, $text, $domain ) {
    if ( 'plugin-text-domain' !== $domain ) { // replace with the plugin's text domain
        return $translated;
    }
    if ( 'Subscribe' === $text ) {
        return 'Subscribe & Save';
    }
    return $translated;
}, 20, 3 );

Keep in mind that gettext runs on every string, so keep the check simple, and use the dedicated plugin filters where they exist.

Test the changes

  • Check simple and variable products, with and without discounts.
  • Check the product page, cart, checkout and emails.
  • Clear page and object caches, then test logged out.
  • Re-test after plugin updates — string changes can break if the plugin renames its text.

Frequently asked questions

Will a plugin update remove my changes?

Not if the code lives in a child theme or a snippets plugin. Edits made directly inside plugin files are overwritten on every update.

Why did the discount disappear after I changed the label?

The default label includes a placeholder for the discount value. If your replacement text leaves the placeholder out, the number is removed too — add it back into your custom string.

Can I change these strings without code?

A translation plugin such as Loco Translate can change many plugin strings without code, but filters give you more control — for example showing the highest discount.

#Subscriptions#WooCommerce#WordPress

Tech Pumpkin team

Written and reviewed by the specialists who do this work for clients.

// related serviceEcommerce DevelopmentSee how we help →

// got a question about this?

Start a conversation with our team.

Tell our assistant what you’re working on — a real person reads every message and follows up.

Start a Conversation →

// new insights by email

Practical guides, no spam.

Tech Pumpkin AIInstant assistant. Let's start building.