# IAS Subscriptions — WP-CLI Commands **Slug:** `ias-subscriptions`  •  **Version:** 1.1.16  •  **Namespace:** `wp ias subscriptions`  •  **Tier:** Commercial (licence required) > Recurring billing: list, renew, pause, resume, cancel, reactivate, switch, trial, fees and delete. All commands accept `--format=`. Mutating commands support `--dry-run` and `--yes`; destructive commands prompt for confirmation unless `--yes` is passed, and any bulk-delete command refuses to run without an explicit scope argument — a required `--filter` on the record-deletion commands, or another mandatory bound such as `--max-age-days` — rather than defaulting to delete-all. ## Authentication & trust model These commands run under WP-CLI, whose trust boundary is **shell access**: anyone who can run `wp` on the server already has full database and PHP access (`wp db query`, `wp eval`). The CLI therefore adds **no separate capability check** — a `current_user_can()` gate would add no real protection and would wrongly refuse commands run without `--user=` (WP-CLI bootstraps as user 0). Protection for the irreversible commands instead comes from `--dry-run` previews, an explicit confirmation prompt (or `--yes`), a mandatory scope argument on any bulk delete (a `--filter`, or another mandatory bound such as `--max-age-days`), and a before-state entry written to the suite-wide CLI audit log. Commands that cannot be undone are flagged with a **⚠ Irreversible** banner below. ## Index - [`wp ias subscriptions cancel`](#wp-ias-subscriptions-cancel) - [`wp ias subscriptions delete`](#wp-ias-subscriptions-delete) - [`wp ias subscriptions delete-bulk`](#wp-ias-subscriptions-delete-bulk) - [`wp ias subscriptions dunning-ladder`](#wp-ias-subscriptions-dunning-ladder) - [`wp ias subscriptions export`](#wp-ias-subscriptions-export) - [`wp ias subscriptions fees list`](#wp-ias-subscriptions-fees-list) - [`wp ias subscriptions fees waive`](#wp-ias-subscriptions-fees-waive) - [`wp ias subscriptions import-wcs`](#wp-ias-subscriptions-import-wcs) - [`wp ias subscriptions inspect`](#wp-ias-subscriptions-inspect) - [`wp ias subscriptions inspect-gateway`](#wp-ias-subscriptions-inspect-gateway) - [`wp ias subscriptions links`](#wp-ias-subscriptions-links) - [`wp ias subscriptions list`](#wp-ias-subscriptions-list) - [`wp ias subscriptions pause`](#wp-ias-subscriptions-pause) - [`wp ias subscriptions reactivate`](#wp-ias-subscriptions-reactivate) - [`wp ias subscriptions renew`](#wp-ias-subscriptions-renew) - [`wp ias subscriptions resume`](#wp-ias-subscriptions-resume) - [`wp ias subscriptions show`](#wp-ias-subscriptions-show) - [`wp ias subscriptions switch`](#wp-ias-subscriptions-switch) - [`wp ias subscriptions trial end`](#wp-ias-subscriptions-trial-end) - [`wp ias subscriptions trial extend`](#wp-ias-subscriptions-trial-extend) ## `wp ias subscriptions cancel` Cancel a subscription, immediately or at the end of the current period. 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. ```bash wp ias subscriptions cancel [--immediate] [--reason=] [--dry-run] [--yes] [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Subscription ID. | | `[--immediate]` | no | flag | Cancel now instead of at the end of the current paid period. | | `[--reason=]` | no | flag (value) | Note recorded against the cancellation. | | `[--dry-run]` | no | flag | Report what would happen without changing the status. | | `[--yes]` | no | flag | Skip the confirmation prompt. | | `[--format=]` | no | flag (value) | Output format. | **Example:** ```bash 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). 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. ```bash wp ias subscriptions delete [--keep-audit] [--dry-run] [--yes] [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Subscription ID. | | `[--keep-audit]` | no | flag | Preserve the subscription's event-log rows (ias_subscription_log). | | `[--dry-run]` | no | flag | Report what would be deleted without removing anything. | | `[--yes]` | no | flag | Skip the confirmation prompt. | | `[--format=]` | no | flag (value) | Output format. | **Returns:** The deleted subscription ID and the list of tables cleared. **Example:** ```bash 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). 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. ```bash wp ias subscriptions delete-bulk --filter= [--keep-audit] [--dry-run] [--yes] [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `--filter=` | yes | flag (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]` | no | flag | Preserve each subscription's event-log rows (ias_subscription_log). | | `[--dry-run]` | no | flag | Report the matched set and counts without removing anything. | | `[--yes]` | no | flag | Skip the confirmation prompt. | | `[--format=]` | no | flag (value) | Output format. | **Returns:** The matched count and the deleted count. **Example:** ```bash 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. ```bash wp ias subscriptions dunning-ladder [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Subscription ID. | | `[--format=]` | no | flag (value) | Output format. | **Example:** ```bash 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. 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. ```bash wp ias subscriptions export --file= [--format=] [--status=] [--customer=] [--gateway=] [--product=] [--dry-run] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `--file=` | yes | flag (value) | Destination file path. | | `[--format=]` | no | flag (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=]` | no | flag (value) | Restrict to these statuses (comma-separated, e.g. active,on-hold). | | `[--customer=]` | no | flag (value) | Restrict to one customer (numeric WP user ID or email). | | `[--gateway=]` | no | flag (value) | Restrict to one payment gateway (e.g. stripe, ppcp-gateway). | | `[--product=]` | no | flag (value) | Restrict to one product ID. | | `[--dry-run]` | no | flag | Report how many subscriptions would be exported without writing the file. | **Example:** ```bash 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. 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. ```bash wp ias subscriptions fees list [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Subscription ID. | | `[--format=]` | no | flag (value) | Output format. | **Example:** ```bash 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). 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). ```bash wp ias subscriptions fees waive [--reason=] [--dry-run] [--yes] [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Subscription ID. | | `` | yes | positional | Fee identifier to waive (e.g. sign_up). | | `[--reason=]` | no | flag (value) | Note recorded against the waiver. | | `[--dry-run]` | no | flag | Report what would happen without recording the waiver. | | `[--yes]` | no | flag | Skip the confirmation prompt. | | `[--format=]` | no | flag (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). **Example:** ```bash 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). 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. ```bash wp ias subscriptions import-wcs [--execute] [--dry-run] [--reconcile] [--batch=] [--status=] [--customer=] [--limit=] [--offset=] [--source-backend=] [--overdue=] [--allow-wcs-active] [--report=] [--yes] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `[--execute]` | no | flag | Actually write the subscriptions. Without this the command only reports. | | `[--dry-run]` | no | flag | Explicit alias for the default behaviour (report only). | | `[--reconcile]` | no | flag | Re-read the source behind every already-imported subscription and report drift instead of importing. Read-only; runnable any time after an import. | | `[--batch=]` | no | flag (value) | With --reconcile, restrict to one import batch. | | `[--status=]` | no | flag (value) | Restrict to these statuses (comma-separated, e.g. active,on-hold). | | `[--customer=]` | no | flag (value) | Restrict to one customer (numeric WP user ID or email). | | `[--limit=]` | no | flag (value) | Maximum number of source subscriptions to consider. | | `[--offset=]` | no | flag (value) | Skip this many source subscriptions. | | `[--source-backend=]` | no | flag (value) | Which storage backend to read the source from. | | `[--overdue=]` | no | flag (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]` | no | flag | Proceed even though the real WooCommerce Subscriptions plugin is active. | | `[--report=]` | no | flag (value) | Write the full per-record detail to a JSON file. | | `[--yes]` | no | flag | Skip 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. **Example:** ```bash 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. ```bash wp ias subscriptions inspect [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `[--format=]` | no | flag (value) | Output format. | **Example:** ```bash 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. The webhook secret/ID value is never printed — only whether it is configured. ```bash wp ias subscriptions inspect-gateway [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Gateway to inspect. | | `[--format=]` | no | flag (value) | Output format. | **Example:** ```bash 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 links` Show the License Activator link state for a subscription. Resolves licenses by the subscription's product + customer via the License Activator integration (`ias_license_get_product_licenses`). When the License Activator is not active this reports no link. ```bash wp ias subscriptions links [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Subscription ID. | | `[--format=]` | no | flag (value) | Output format. | **Example:** ```bash wp ias subscriptions links 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 list` List subscriptions with filters and pagination. ```bash wp ias subscriptions list [--status=] [--customer=] [--gateway=] [--page=] [--per-page=] [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `[--status=]` | no | flag (value) | Filter by status (comma-separated for multiple, e.g. active,on-hold). | | `[--customer=]` | no | flag (value) | Filter by customer (numeric WP user ID or email). | | `[--gateway=]` | no | flag (value) | Filter by payment gateway/method ID (e.g. stripe, ppcp-gateway). | | `[--page=]` | no | flag (value) | Page of results (1-based). | | `[--per-page=]` | no | flag (value) | Results per page (capped at 1000). | | `[--format=]` | no | flag (value) | Output format. | **Example:** ```bash 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. 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. ```bash wp ias subscriptions pause [--reason=] [--dry-run] [--yes] [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Subscription ID. | | `[--reason=]` | no | flag (value) | Note recorded against the status change. | | `[--dry-run]` | no | flag | Report what would happen without changing the status. | | `[--yes]` | no | flag | Skip the confirmation prompt. | | `[--format=]` | no | flag (value) | Output format. | **Example:** ```bash 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). 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. ```bash wp ias subscriptions reactivate [--force] [--dry-run] [--yes] [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Subscription ID. | | `[--force]` | no | flag | Revive even if the subscription has been terminal longer than the window. | | `[--dry-run]` | no | flag | Report what would happen without changing the status. | | `[--yes]` | no | flag | Skip the confirmation prompt. | | `[--format=]` | no | flag (value) | Output format. | **Example:** ```bash 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. 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. ```bash wp ias subscriptions renew [--dry-run] [--yes] [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Subscription ID. | | `[--dry-run]` | no | flag | Report what would happen without creating an order or charging. | | `[--yes]` | no | flag | Skip the confirmation prompt. | | `[--format=]` | no | flag (value) | Output format. | **Example:** ```bash 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. 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. ```bash wp ias subscriptions resume [--dry-run] [--yes] [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Subscription ID. | | `[--dry-run]` | no | flag | Report what would happen without changing the status. | | `[--yes]` | no | flag | Skip the confirmation prompt. | | `[--format=]` | no | flag (value) | Output format. | **Example:** ```bash 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. ```bash wp ias subscriptions show [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Subscription ID. | | `[--format=]` | no | flag (value) | Output format. | **Example:** ```bash 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. 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). ```bash wp ias subscriptions switch [--prorate=] [--immediate] [--dry-run] [--yes] [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Subscription ID. | | `` | yes | positional | The variation ID of the plan to switch to (must belong to the same parent product). | | `[--prorate=]` | no | flag (value) | Whether to compute and report the would-be proration charge for reference. | | `[--immediate]` | no | flag | Apply the switch to the subscription now instead of at the next renewal. | | `[--dry-run]` | no | flag | Report what would happen without storing the pending switch or applying it. | | `[--yes]` | no | flag | Skip the confirmation prompt. | | `[--format=]` | no | flag (value) | Output format. | **Returns:** The resulting status, variation and recurring total (after, when --immediate). **Example:** ```bash 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. 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. ```bash wp ias subscriptions trial end [--dry-run] [--yes] [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Subscription ID. | | `[--dry-run]` | no | flag | Report what would happen without clearing the trial date. | | `[--yes]` | no | flag | Skip the confirmation prompt. | | `[--format=]` | no | flag (value) | Output format. | **Returns:** The subscription ID and the trial_end date that was cleared. **Example:** ```bash 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. 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. ```bash wp ias subscriptions trial extend --days= [--dry-run] [--yes] [--format=] ``` | Argument | Required | Type | Description | |----------|----------|------|-------------| | `` | yes | positional | Subscription ID. | | `--days=` | yes | flag (value) | Number of days to extend the trial by (positive integer). | | `[--dry-run]` | no | flag | Report what would happen without changing the trial date. | | `[--yes]` | no | flag | Skip the confirmation prompt. | | `[--format=]` | no | flag (value) | Output format. | **Returns:** The subscription ID with the old and new trial_end dates. **Example:** ```bash 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`