It's All Stack · CLI Reference

IAS Subscriptions

Recurring billing: list, renew, pause, resume, cancel, reactivate, switch, trial, fees and delete.

Conventions on this page

Every command accepts --format=<json|table|csv|yaml>. Commands marked Write accept --dry-run (resolve, audit, write nothing) and --yes (skip the prompt). Commands marked Irreversible additionally prompt unless --yes is passed, and any bulk delete refuses to run without an explicit scope argument rather than defaulting to delete-all.

wp ias subscriptions cancel#

Cancel a subscription, immediately or at the end of the current period.

wp ias subscriptions cancel <id> [--immediate] [--reason=<text>] [--dry-run] [--yes] [--format=<format>]

Runs under the renewal lock. Uses the same path the admin/REST cancel uses — Subscription::update_status() (and update_dates() for the end-of-period case) — so downstream refund/licence/email side effects driven by the status hooks all fire. Without --immediate the subscription becomes pending-cancel with its end date set to the next payment date, which schedules the end-of-period cancellation.

Options

ArgumentRequiredTypeDescription
<id>yespositionalSubscription ID.
[--immediate]noflagCancel now instead of at the end of the current paid period.
[--reason=<text>]noflag (value)Note recorded against the cancellation.
[--dry-run]noflagReport what would happen without changing the status.
[--yes]noflagSkip the confirmation prompt.
[--format=<format>]noflag (value)Output format.

Examples

wp ias subscriptions cancel 17
wp ias subscriptions cancel 17 --immediate --reason="Fraud"

Related

wp ias subscriptions delete · wp ias subscriptions delete-bulk · wp ias subscriptions dunning-ladder · wp ias subscriptions export · wp ias subscriptions import-wcs · wp ias subscriptions inspect · wp ias subscriptions inspect-gateway · wp ias subscriptions links

wp ias subscriptions delete#

⚠ Irreversible — --dry-run first.

This command permanently destroys data or applies a terminal state that cannot be undone from the CLI. Preview the exact effect with --dry-run, then re-run with --yes once you are certain.

Permanently delete a subscription and all its rows (NON-RECOVERABLE).

wp ias subscriptions delete <id> [--keep-audit] [--dry-run] [--yes] [--format=<format>]

Unlike cancel — which keeps the subscription record and only changes its status — this HARD-deletes the subscription and its items, meta, order links and (unless --keep-audit) its event log from the database. Runs under the renewal lock and re-fetches inside it. There is no undo.

Options

ArgumentRequiredTypeDescription
<id>yespositionalSubscription ID.
[--keep-audit]noflagPreserve the subscription's event-log rows (ias_subscription_log).
[--dry-run]noflagReport what would be deleted without removing anything.
[--yes]noflagSkip the confirmation prompt.
[--format=<format>]noflag (value)Output format.

Returns

The deleted subscription ID and the list of tables cleared.

Examples

wp ias subscriptions delete 17 --dry-run
wp ias subscriptions delete 17 --keep-audit --yes

Related

wp ias subscriptions cancel · wp ias subscriptions delete-bulk · wp ias subscriptions dunning-ladder · wp ias subscriptions export · wp ias subscriptions import-wcs · wp ias subscriptions inspect · wp ias subscriptions inspect-gateway · wp ias subscriptions links

wp ias subscriptions delete-bulk#

⚠ Irreversible — --dry-run first.

This command permanently destroys data or applies a terminal state that cannot be undone from the CLI. Preview the exact effect with --dry-run, then re-run with --yes once you are certain.

Permanently delete every subscription matching a JSON filter (NON-RECOVERABLE).

wp ias subscriptions delete-bulk --filter=<json> [--keep-audit] [--dry-run] [--yes] [--format=<format>]

A guarded bulk variant of delete. The --filter JSON is REQUIRED; there is deliberately no --all switch. Each matched subscription is hard-deleted under its own renewal lock. Capped at 1000 matches per run.

Options

ArgumentRequiredTypeDescription
--filter=<json>yesflag (value)Required JSON object selecting which subscriptions to delete. Supported keys: status (string), customer_id (int), product_id (int), import_batch (string — the wcsimp-… batch minted by import-wcs, which makes a bad import reversible with the existing destructive machinery rather than a second destructive command). Keys combine as AND.
[--keep-audit]noflagPreserve each subscription's event-log rows (ias_subscription_log).
[--dry-run]noflagReport the matched set and counts without removing anything.
[--yes]noflagSkip the confirmation prompt.
[--format=<format>]noflag (value)Output format.

Returns

The matched count and the deleted count.

Examples

wp ias subscriptions delete-bulk --filter='{"status":"cancelled"}' --dry-run
wp ias subscriptions delete-bulk --filter='{"status":"expired","product_id":42}' --yes

Related

wp ias subscriptions cancel · wp ias subscriptions delete · wp ias subscriptions dunning-ladder · wp ias subscriptions export · wp ias subscriptions import-wcs · wp ias subscriptions inspect · wp ias subscriptions inspect-gateway · wp ias subscriptions links

wp ias subscriptions dunning-ladder#

Show the dunning (retry) schedule and current retry state of a subscription.

wp ias subscriptions dunning-ladder <id> [--format=<format>]

Options

ArgumentRequiredTypeDescription
<id>yespositionalSubscription ID.
[--format=<format>]noflag (value)Output format.

Example

wp ias subscriptions dunning-ladder 17 --format=json

Related

wp ias subscriptions cancel · wp ias subscriptions delete · wp ias subscriptions delete-bulk · wp ias subscriptions export · wp ias subscriptions import-wcs · wp ias subscriptions inspect · wp ias subscriptions inspect-gateway · wp ias subscriptions links

wp ias subscriptions export#

Export subscriptions to a JSON or CSV file.

wp ias subscriptions export --file=<path> [--format=<format>] [--status=<status>] [--customer=<customer>] [--gateway=<gateway>] [--product=<product>] [--dry-run]

A migration source, not a report. Each record carries the billing schedule, the parent order and every related order, the line items, the meta and the payment-method reference — enough to reconstruct the subscription elsewhere.

NOT licence-gated, deliberately. A lapsed licence must never strand a merchant's own subscriber records: the rows would still sit in ias_subscriptions with no supported way out. Being able to leave is a reason to buy. (Same call as wp ias serial-keys export and the License Activator's CSV export.)

Billing survives the move. Renewals are taken by setting the payment method on a renewal order and letting the standard WooCommerce gateway charge it, so the mandate and token live in WooCommerce's token store and the gateway account — not in this plugin. payment_method and payment_token_id are references into those, so exporting them carries the ability to keep billing without exporting anything that can charge a card on its own.

Options

ArgumentRequiredTypeDescription
--file=<path>yesflag (value)Destination file path.
[--format=<format>]noflag (value)Export FILE format. JSON is the default because a subscription has nested line items, related orders and meta; CSV flattens those to JSON-encoded cells and is for spreadsheets rather than for migration.
[--status=<status>]noflag (value)Restrict to these statuses (comma-separated, e.g. active,on-hold).
[--customer=<customer>]noflag (value)Restrict to one customer (numeric WP user ID or email).
[--gateway=<gateway>]noflag (value)Restrict to one payment gateway (e.g. stripe, ppcp-gateway).
[--product=<product>]noflag (value)Restrict to one product ID.
[--dry-run]noflagReport how many subscriptions would be exported without writing the file.

Examples

wp ias subscriptions export --file=subscriptions.json
wp ias subscriptions export --file=active.json --status=active
wp ias subscriptions export --file=subs.csv --format=csv --gateway=stripe
wp ias subscriptions export --file=/tmp/all.json --dry-run

Related

wp ias subscriptions cancel · wp ias subscriptions delete · wp ias subscriptions delete-bulk · wp ias subscriptions dunning-ladder · wp ias subscriptions import-wcs · wp ias subscriptions inspect · wp ias subscriptions inspect-gateway · wp ias subscriptions links

wp ias subscriptions fees list#

List the sign-up fee(s) attached to a subscription.

wp ias subscriptions fees list <id> [--format=<format>]

Per-subscription fees are not stored as line items; the sign-up fee is read from the subscription's product. Switch/proration fees are computed at renewal time and are not listed here. Each row carries a waived flag read from the _ias_sub_waived_fees meta (set by fees waive) — an observational reporting marker only; it does not affect what is charged.

Options

ArgumentRequiredTypeDescription
<id>yespositionalSubscription ID.
[--format=<format>]noflag (value)Output format.

Example

wp ias subscriptions fees list 17 --format=json

Related

wp ias subscriptions fees waive

wp ias subscriptions fees waive#

Record a fee-waiver marker on a subscription (bookkeeping only).

wp ias subscriptions fees waive <id> <fee_id> [--reason=<text>] [--dry-run] [--yes] [--format=<format>]

Sign-up fees are one-time charges assessed at the INITIAL checkout, before a subscription exists, so there is no later assessment for a waiver to suppress (the plugin has no resubscribe flow, and plan switches charge a freshly computed proration, not a sign-up fee). This command therefore records an observational marker: it appends the fee id to the subscription's _ias_sub_waived_fees array meta and logs a fee_waived event. The marker is surfaced by fees list (the row's waived flag) for reporting and reconciliation; it does NOT itself alter, refund, or suppress any charge — no charge-assessment path consults this meta. Because the write touches no money path, it is intentionally not wrapped in the renewal lock (it is a per-key meta upsert that only ever races a concurrent fees waive on the same id).

Options

ArgumentRequiredTypeDescription
<id>yespositionalSubscription ID.
<fee_id>yespositionalFee identifier to waive (e.g. sign_up).
[--reason=<text>]noflag (value)Note recorded against the waiver.
[--dry-run]noflagReport what would happen without recording the waiver.
[--yes]noflagSkip the confirmation prompt.
[--format=<format>]noflag (value)Output format.

Returns

The subscription ID, the waived fee id and the resulting waived-fee marker list (a reporting record; it does not change any charge).

Examples

wp ias subscriptions fees waive 17 sign_up --dry-run
wp ias subscriptions fees waive 17 sign_up --reason="Goodwill" --yes

Related

wp ias subscriptions fees list

wp ias subscriptions import-wcs#

Import WooCommerce Subscriptions data into IAS Subscriptions (same store).

wp ias subscriptions import-wcs [--execute] [--dry-run] [--reconcile] [--batch=<id>] [--status=<list>] [--customer=<customer>] [--limit=<n>] [--offset=<n>] [--source-backend=<backend>] [--overdue=<policy>] [--allow-wcs-active] [--report=<path>] [--yes]

WCS hook compatibility keeps other plugins working but moves no data: a store with 500 live WCS subscriptions cannot switch on compatibility alone. This turns shop_subscription records into ias_subscriptions rows while preserving the one thing that makes a migration real rather than cosmetic — the ability to keep billing. The mandate and the card live in the gateway account and in WooCommerce's own token store, not in either plugin, so moving rows on the same store preserves them; this command translates the gateway REFERENCES onto the keys the IAS renewal engine reads.

Reads the source with raw SQL from either storage backend, never the wcs_*() API: with WCS deactivated those functions do not exist, and this plugin's own compatibility shims would answer with IAS data instead. It therefore works with WCS active, deactivated, or deleted with its data left behind. The WCS source is never modified by any phase of this command, which is what makes the rollback trustworthy.

Options

ArgumentRequiredTypeDescription
[--execute]noflagActually write the subscriptions. Without this the command only reports.
[--dry-run]noflagExplicit alias for the default behaviour (report only).
[--reconcile]noflagRe-read the source behind every already-imported subscription and report drift instead of importing. Read-only; runnable any time after an import.
[--batch=<id>]noflag (value)With --reconcile, restrict to one import batch.
[--status=<list>]noflag (value)Restrict to these statuses (comma-separated, e.g. active,on-hold).
[--customer=<customer>]noflag (value)Restrict to one customer (numeric WP user ID or email).
[--limit=<n>]noflag (value)Maximum number of source subscriptions to consider.
[--offset=<n>]noflag (value)Skip this many source subscriptions.
[--source-backend=<backend>]noflag (value)Which storage backend to read the source from.
[--overdue=<policy>]noflag (value)What to do with active subscriptions whose next payment is already in the past. bill imports them as-is and the renewal sweep charges them once (the WCS-faithful behaviour); hold imports them as on-hold so nothing bills until reviewed.
[--allow-wcs-active]noflagProceed even though the real WooCommerce Subscriptions plugin is active.
[--report=<path>]noflag (value)Write the full per-record detail to a JSON file.
[--yes]noflagSkip the confirmation prompt on --execute.

Returns

A JSON summary: what would be created, what was skipped and why, every warning class with the source IDs it applies to, the unmappable records with reasons, and an expected_next_charges preview so the money can be reviewed before anything is written.

Examples

wp ias subscriptions import-wcs
wp ias subscriptions import-wcs --status=active --report=/tmp/import.json
wp ias subscriptions import-wcs --execute --overdue=hold --yes
wp ias subscriptions import-wcs --reconcile --batch=wcsimp-20260806-a1b2

Related

wp ias subscriptions cancel · wp ias subscriptions delete · wp ias subscriptions delete-bulk · wp ias subscriptions dunning-ladder · wp ias subscriptions export · wp ias subscriptions inspect · wp ias subscriptions inspect-gateway · wp ias subscriptions links

wp ias subscriptions inspect#

Report the plugin slug, version and CLI environment.

wp ias subscriptions inspect [--format=<format>]

Options

ArgumentRequiredTypeDescription
[--format=<format>]noflag (value)Output format.

Example

wp ias subscriptions inspect

Related

wp ias subscriptions cancel · wp ias subscriptions delete · wp ias subscriptions delete-bulk · wp ias subscriptions dunning-ladder · wp ias subscriptions export · wp ias subscriptions import-wcs · wp ias subscriptions inspect-gateway · wp ias subscriptions links

wp ias subscriptions inspect-gateway#

Inspect a payment gateway's configuration and dunning policy.

wp ias subscriptions inspect-gateway <gateway> [--format=<format>]

The webhook secret/ID value is never printed — only whether it is configured.

Options

ArgumentRequiredTypeDescription
<gateway>yespositionalGateway to inspect.
[--format=<format>]noflag (value)Output format.

Example

wp ias subscriptions inspect-gateway stripe

Related

wp ias subscriptions cancel · wp ias subscriptions delete · wp ias subscriptions delete-bulk · wp ias subscriptions dunning-ladder · wp ias subscriptions export · wp ias subscriptions import-wcs · wp ias subscriptions inspect · wp ias subscriptions links

wp ias subscriptions list#

List subscriptions with filters and pagination.

wp ias subscriptions list [--status=<status>] [--customer=<customer>] [--gateway=<gateway>] [--page=<page>] [--per-page=<per-page>] [--format=<format>]

Options

ArgumentRequiredTypeDescription
[--status=<status>]noflag (value)Filter by status (comma-separated for multiple, e.g. active,on-hold).
[--customer=<customer>]noflag (value)Filter by customer (numeric WP user ID or email).
[--gateway=<gateway>]noflag (value)Filter by payment gateway/method ID (e.g. stripe, ppcp-gateway).
[--page=<page>]noflag (value)Page of results (1-based).
[--per-page=<per-page>]noflag (value)Results per page (capped at 1000).
[--format=<format>]noflag (value)Output format.

Examples

wp ias subscriptions list --status=active,on-hold
wp ias subscriptions list --customer=42 --gateway=stripe --format=json

Related

wp ias subscriptions cancel · wp ias subscriptions delete · wp ias subscriptions delete-bulk · wp ias subscriptions dunning-ladder · wp ias subscriptions export · wp ias subscriptions import-wcs · wp ias subscriptions inspect · wp ias subscriptions inspect-gateway

wp ias subscriptions pause#

Pause (put on-hold) an active subscription.

wp ias subscriptions pause <id> [--reason=<text>] [--dry-run] [--yes] [--format=<format>]

Runs under the renewal lock and re-fetches inside it. Delegates the state change to Subscription::update_status('on-hold'), which fires the standard WCS-compatible and IAS status hooks.

Options

ArgumentRequiredTypeDescription
<id>yespositionalSubscription ID.
[--reason=<text>]noflag (value)Note recorded against the status change.
[--dry-run]noflagReport what would happen without changing the status.
[--yes]noflagSkip the confirmation prompt.
[--format=<format>]noflag (value)Output format.

Example

wp ias subscriptions pause 17 --reason="Customer request"

Related

wp ias subscriptions cancel · wp ias subscriptions delete · wp ias subscriptions delete-bulk · wp ias subscriptions dunning-ladder · wp ias subscriptions export · wp ias subscriptions import-wcs · wp ias subscriptions inspect · wp ias subscriptions inspect-gateway

wp ias subscriptions reactivate#

Reactivate a cancelled or expired subscription (admin revival path).

wp ias subscriptions reactivate <id> [--force] [--dry-run] [--yes] [--format=<format>]

This is the legitimate revival path the M-A-R3 audit preserved: moving a terminal subscription back to active. Runs under the renewal lock. Allowed only from cancelled or expired. As a guard against accidentally reviving long-dead subscriptions, revival is blocked when the terminal (cancelled/end) date is older than the window (default 90 days; filter ias_sub_cli_reactivate_max_age_days) unless --force is given.

Options

ArgumentRequiredTypeDescription
<id>yespositionalSubscription ID.
[--force]noflagRevive even if the subscription has been terminal longer than the window.
[--dry-run]noflagReport what would happen without changing the status.
[--yes]noflagSkip the confirmation prompt.
[--format=<format>]noflag (value)Output format.

Examples

wp ias subscriptions reactivate 17
wp ias subscriptions reactivate 17 --force --yes

Related

wp ias subscriptions cancel · wp ias subscriptions delete · wp ias subscriptions delete-bulk · wp ias subscriptions dunning-ladder · wp ias subscriptions export · wp ias subscriptions import-wcs · wp ias subscriptions inspect · wp ias subscriptions inspect-gateway

wp ias subscriptions renew#

Process a renewal cycle for a subscription now.

wp ias subscriptions renew <id> [--dry-run] [--yes] [--format=<format>]

Delegates to Renewal_Handler::process_renewal(), which acquires the renewal lock, re-checks the subscription is still active (the M-A-R3 guard), creates the renewal order and charges the gateway. Only active subscriptions renew.

Options

ArgumentRequiredTypeDescription
<id>yespositionalSubscription ID.
[--dry-run]noflagReport what would happen without creating an order or charging.
[--yes]noflagSkip the confirmation prompt.
[--format=<format>]noflag (value)Output format.

Examples

wp ias subscriptions renew 17 --dry-run
wp ias subscriptions renew 17 --yes

Related

wp ias subscriptions cancel · wp ias subscriptions delete · wp ias subscriptions delete-bulk · wp ias subscriptions dunning-ladder · wp ias subscriptions export · wp ias subscriptions import-wcs · wp ias subscriptions inspect · wp ias subscriptions inspect-gateway

wp ias subscriptions resume#

Resume (reactivate) a paused subscription.

wp ias subscriptions resume <id> [--dry-run] [--yes] [--format=<format>]

Runs under the renewal lock. Delegates to Subscription::update_status('active'); the Failed_Payment_Handler clears any retry/dunning state on the transition to active, so the subscription re-enters the normal renewal sweep.

Options

ArgumentRequiredTypeDescription
<id>yespositionalSubscription ID.
[--dry-run]noflagReport what would happen without changing the status.
[--yes]noflagSkip the confirmation prompt.
[--format=<format>]noflag (value)Output format.

Example

wp ias subscriptions resume 17

Related

wp ias subscriptions cancel · wp ias subscriptions delete · wp ias subscriptions delete-bulk · wp ias subscriptions dunning-ladder · wp ias subscriptions export · wp ias subscriptions import-wcs · wp ias subscriptions inspect · wp ias subscriptions inspect-gateway

wp ias subscriptions show#

Show the lifecycle and entitlement state of one subscription.

wp ias subscriptions show <id> [--format=<format>]

Options

ArgumentRequiredTypeDescription
<id>yespositionalSubscription ID.
[--format=<format>]noflag (value)Output format.

Example

wp ias subscriptions show 17 --format=json

Related

wp ias subscriptions cancel · wp ias subscriptions delete · wp ias subscriptions delete-bulk · wp ias subscriptions dunning-ladder · wp ias subscriptions export · wp ias subscriptions import-wcs · wp ias subscriptions inspect · wp ias subscriptions inspect-gateway

wp ias subscriptions switch#

Switch a subscription to a different plan variation.

wp ias subscriptions switch <id> <new_variation_id> [--prorate=<bool>] [--immediate] [--dry-run] [--yes] [--format=<format>]

Queues a plan switch by storing the _pending_switch_variation_id meta. The new plan takes effect at the NEXT renewal: Renewal_Handler::process_renewal() applies the pending switch BEFORE building the renewal order, so the renewal charges the NEW price and then advances the schedule by the NEW period — it is never charged at a stale old price. With --immediate the switch is applied to the subscription right now via the same apply path. This CLI command does NOT take an immediate card payment; the proration figure is REPORTED for reference only (a real upgrade charge happens through the customer/admin switch flow, not here).

Options

ArgumentRequiredTypeDescription
<id>yespositionalSubscription ID.
<new_variation_id>yespositionalThe variation ID of the plan to switch to (must belong to the same parent product).
[--prorate=<bool>]noflag (value)Whether to compute and report the would-be proration charge for reference.
[--immediate]noflagApply the switch to the subscription now instead of at the next renewal.
[--dry-run]noflagReport what would happen without storing the pending switch or applying it.
[--yes]noflagSkip the confirmation prompt.
[--format=<format>]noflag (value)Output format.

Returns

The resulting status, variation and recurring total (after, when --immediate).

Examples

wp ias subscriptions switch 17 88 --dry-run
wp ias subscriptions switch 17 88 --immediate --yes

Related

wp ias subscriptions cancel · wp ias subscriptions delete · wp ias subscriptions delete-bulk · wp ias subscriptions dunning-ladder · wp ias subscriptions export · wp ias subscriptions import-wcs · wp ias subscriptions inspect · wp ias subscriptions inspect-gateway

wp ias subscriptions trial end#

End a subscription's trial immediately so billing can proceed.

wp ias subscriptions trial end <id> [--dry-run] [--yes] [--format=<format>]

Clears the trial_end date. Runs under the renewal lock, re-fetches inside it, and persists via save(). This ends the trial window; the next scheduled renewal charges as normal. It does NOT itself take an immediate payment.

Options

ArgumentRequiredTypeDescription
<id>yespositionalSubscription ID.
[--dry-run]noflagReport what would happen without clearing the trial date.
[--yes]noflagSkip the confirmation prompt.
[--format=<format>]noflag (value)Output format.

Returns

The subscription ID and the trial_end date that was cleared.

Examples

wp ias subscriptions trial end 17 --dry-run
wp ias subscriptions trial end 17 --yes

Related

wp ias subscriptions trial extend

wp ias subscriptions trial extend#

Extend a subscription's trial window by a number of days.

wp ias subscriptions trial extend <id> --days=<n> [--dry-run] [--yes] [--format=<format>]

Pushes the trial_end date forward by --days. Runs under the renewal lock, re-fetches inside it, updates the date and persists via save(). Errors if the subscription has no trial. This does not itself take a payment — the first charge happens at the (now later) end of the trial.

Options

ArgumentRequiredTypeDescription
<id>yespositionalSubscription ID.
--days=<n>yesflag (value)Number of days to extend the trial by (positive integer).
[--dry-run]noflagReport what would happen without changing the trial date.
[--yes]noflagSkip the confirmation prompt.
[--format=<format>]noflag (value)Output format.

Returns

The subscription ID with the old and new trial_end dates.

Examples

wp ias subscriptions trial extend 17 --days=7 --dry-run
wp ias subscriptions trial extend 17 --days=14 --yes

Related

wp ias subscriptions trial end