Skip to content

Billing & Lifecycle

WPLM ships a complete recurring-billing engine — you do not need the paid WooCommerce Subscriptions extension. WooCommerce provides only the cart, checkout, and stored payment token; WPLM owns the schedule, status, and lifecycle.

Subscription statusLicense effect
pendingAwaiting first payment — license pending.
trialIn the free-trial window — license active, no charge yet.
activePaid and current — license active.
on-holdPayment failed or manually paused — license suspended.
pending-cancelCancelled by the user but paid through period end — license active until end_date, then revoked.
cancelledEnded — license revoked.
expiredReached a fixed end date — license revoked.

The license status always tracks the subscription, so access turns on and off automatically.

The next-payment date is computed from the license type’s interval + period, anchored to the start (or to the trial end). All schedule math runs in UTC. Override the computed date with the wplm_subscription_next_payment filter.

  • Trials defer the first recurring charge until the trial ends.
  • Sign-up fees are charged once, on the parent order.

An hourly WP-Cron job (wplm_process_renewals) finds subscriptions due for renewal and charges the stored WooCommerce payment token:

  1. On success → creates a paid WooCommerce renewal order, records a renewal row, advances the next-payment date, extends the bound license, and fires wplm_subscription_renewed.
  2. On failure → increments the failure counter and hands off to dunning.

The dunning manager retries failed charges on a configurable schedule (default days 1, 3, 5 after failure — see Settings → Dunning). While retrying, the subscription goes on-hold and the license is suspended. A successful retry reactivates both; exhausting all retries cancels the subscription and revokes the license, firing wplm_subscription_payment_failed_final.

Customise the retry offsets:

add_filter( 'wplm_dunning_retry_schedule', fn() => array( 2, 5, 9 ) );

WPLM sends lifecycle emails (created, renewal processed, payment failed, cancelled, expired, trial ending). Bodies are filterable:

add_filter( 'wplm_subscription_email_content', function ( $html, $template, $sub ) {
return $html; // customise per template
}, 10, 3 );

License Manager → Subscriptions lists every subscription with status, next payment, and amount. Open one to change the schedule/amount, pause, resume, cancel, or view its renewal history. The same operations are available via the PHP API (wplm_pause_subscription(), wplm_cancel_subscription(), …) and REST.