Price Tiers

Each product can have multiple price tiers stored in the wplf_product_prices table. A tier defines the billing interval, price, activation limit, feature flags, and payment provider mapping for a specific plan.

Tier fields

Each price tier row in the admin form contains the following fields:

Field Type Default Description
label text Human-readable tier name (e.g. "Pro", "Enterprise", "Agency"). Displayed in the client library via get_tier_label().
price_interval select month Billing cycle: month, year, or lifetime.
price_amount number Price in your base currency. Stored as decimal(10,2).
activation_limit number 1 Maximum number of sites a licence on this tier can activate simultaneously. Minimum value: 1.
features textarea Feature slugs, one per line. Stored as a JSON array. See Feature Gating.
stripe_price_id text Stripe Price ID (e.g. price_1N...). Links this tier to a Stripe price for automatic licence creation on payment.
wc_product_id number WooCommerce Product ID. Links this tier to a WooCommerce product for automatic licence creation on order completion.
is_active checkbox true Inactive tiers are hidden from new purchases but existing licences on the tier remain valid.
Price Tiers section showing a table with configured tiers
The price tiers table in the product edit form. Use the "+ Add Price Tier" button to add rows.

Managing tiers

The admin UI presents tiers as rows in a table at the bottom of the product form. You can:

  • Add a tier — click the + Add Price Tier button to append a new row
  • Remove a tier — click the × button on the row (only removes from the form; saving commits the change)
  • Reorder — tiers are always sorted by price_amount ascending in the database

Note

Removing a price tier does not invalidate existing licences associated with that tier. Those licences retain their activation limit and feature set until they expire or are manually updated.

Activation limits

The activation_limit field controls how many WordPress sites a single licence key can be activated on simultaneously. This is set per tier, allowing you to differentiate plans by site count:

Tier Activation Limit Use case
Personal 1 Single site licence for individual users
Pro 5 Small business or freelancer with multiple client sites
Agency 25 Agency managing many client installations

When a licence reaches its activation limit, further activation requests return an activation_limit_reached error. The customer must deactivate an existing site before activating a new one.

Payment provider mapping

Each tier can optionally be linked to a Stripe Price or a WooCommerce Product. When a payment is received, LicenceForge matches the incoming price or product ID to a tier and automatically creates a licence with the correct activation limit and features.

Stripe

Enter the Stripe Price ID (starts with price_) from your Stripe Dashboard. LicenceForge listens for checkout.session.completed and invoice.paid webhooks and looks up the tier via WPLF_Product_Service::get_price_by_stripe_id().

WooCommerce

Enter the WooCommerce Product ID (the numeric post ID of the product or variation). On order completion, LicenceForge resolves the tier via WPLF_Product_Service::get_price_by_wc_product().

Warning

Each stripe_price_id must be unique across all products. The database enforces a unique key constraint. Assigning the same Stripe Price ID to multiple tiers will result in a database error on save.

Example configuration

A typical three-tier product might look like this:

Label Interval Price Sites Features
Personal year 49.00 1 core
Pro year 99.00 5 core, advanced-analytics, priority-support
Agency year 249.00 25 core, advanced-analytics, priority-support, white-label

Next steps

  • Feature Gating — learn how to use the features column for conditional functionality
  • Payments — connect Stripe or WooCommerce to automate licence creation