# IAS Bundle Deals — CLI Reference - **Plugin slug:** `ias-bundle-deals` - **Version:** 1.1.13 - **CLI namespace:** `wp ias bundle-deals` - **Tier:** Commercial (licence required) - **Summary:** Bundle deals & ownership: list, inspect, create, update, sync and delete bundles. This reference is generated from the WP-CLI command docblocks (do not edit by hand). Every command accepts `--format=`. Every mutating command supports `--dry-run` (resolve + audit, no writes) and `--yes` (skip the confirmation prompt); destructive commands additionally prompt unless `--yes` is given, 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 — there is no separate capability check. Irreversible commands (flagged below) are guarded by `--dry-run`, a confirmation prompt (or `--yes`), a required scope argument on any bulk delete (a `--filter`, or another mandatory bound such as `--max-age-days`), and a before-state entry in the suite-wide CLI audit log. ## Commands ### `wp ias bundle-deals create` Create a new bundle. Delegates to IAS\BundleDeals\Database::create_bundle(). New bundles are created DISABLED unless --enabled is passed, so they never go live before you have reviewed and synced them. **Synopsis:** `wp ias bundle-deals create --products= --discount= [--enabled] [--dry-run] [--yes] [--format=]` **Options:** - `` — Bundle display name. - `--products=` — Comma-separated WC product IDs. Each must exist, be published and purchasable, and must not itself be a bundle. - `--discount=` — Discount specification — one of `percent:` (n = 0-100), `fixed:` (flat amount off the regular total), or `bundle:` (a flat total price for the whole bundle). - `[--enabled]` — Create the bundle in the active state (default: disabled). - `[--dry-run]` — Validate and report what would be created without writing anything. - `[--yes]` — Skip the confirmation prompt. - `[--format=]` — Output format. **Examples:** ```bash wp ias bundle-deals create "Starter Pack" --products=12,34,56 --discount=percent:15 --enabled wp ias bundle-deals create "Flat Bundle" --products=12,34 --discount=bundle:14.99 --dry-run ``` **Related:** `wp ias bundle-deals delete`, `wp ias bundle-deals inspect`, `wp ias bundle-deals list`, `wp ias bundle-deals show`, `wp ias bundle-deals sync`, `wp ias bundle-deals update`, `wp ias bundle-deals validate` --- ### `wp ias bundle-deals 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. Delete a bundle and its synced (hidden) WooCommerce product. Force-deletes the linked WC_Product_Simple (via IAS\BundleDeals\BundleProduct::delete_product()) and then removes the bundle row (via IAS\BundleDeals\Database::delete_bundle(), which also flushes the bundle cache). This is NON-RECOVERABLE. For safety the command REFUSES to delete a bundle that has recorded purchases unless --force is given. The purchase guard reads the bundle analytics table (net purchases = purchases minus refunds); if analytics are disabled no purchases are recorded, so pass --force to delete in that case. **Synopsis:** `wp ias bundle-deals delete [--force] [--dry-run] [--yes] [--format=]` **Options:** - `` — Bundle ID. - `[--force]` — Override the purchase guard — delete even if the bundle has recorded purchases. This is NOT the confirmation flag; pass --yes to skip the prompt. - `[--dry-run]` — Report what would be deleted (including whether it would be refused) without writing anything. - `[--yes]` — Skip the confirmation prompt. - `[--format=]` — Output format. **Returns:** The deleted bundle_id and the linked_product_id that was removed. **Examples:** ```bash wp ias bundle-deals delete 12 wp ias bundle-deals delete 12 --force --yes wp ias bundle-deals delete 12 --dry-run ``` **Related:** `wp ias bundle-deals create`, `wp ias bundle-deals inspect`, `wp ias bundle-deals list`, `wp ias bundle-deals show`, `wp ias bundle-deals sync`, `wp ias bundle-deals update`, `wp ias bundle-deals validate` --- ### `wp ias bundle-deals inspect` Report the plugin slug, version and CLI environment. **Synopsis:** `wp ias bundle-deals inspect [--format=]` **Options:** - `[--format=]` — Output format. **Examples:** ```bash wp ias bundle-deals inspect ``` **Related:** `wp ias bundle-deals create`, `wp ias bundle-deals delete`, `wp ias bundle-deals list`, `wp ias bundle-deals show`, `wp ias bundle-deals sync`, `wp ias bundle-deals update`, `wp ias bundle-deals validate` --- ### `wp ias bundle-deals list` List bundles. **Synopsis:** `wp ias bundle-deals list [--enabled-only] [--format=]` **Options:** - `[--enabled-only]` — Only list bundles whose master switch (is_active) is on. - `[--format=]` — Output format. **Examples:** ```bash wp ias bundle-deals list wp ias bundle-deals list --enabled-only --format=json ``` **Related:** `wp ias bundle-deals create`, `wp ias bundle-deals delete`, `wp ias bundle-deals inspect`, `wp ias bundle-deals show`, `wp ias bundle-deals sync`, `wp ias bundle-deals update`, `wp ias bundle-deals validate` --- ### `wp ias bundle-deals show` Show a bundle's composition, pricing and schedule. **Synopsis:** `wp ias bundle-deals show [--format=]` **Options:** - `` — Bundle ID. - `[--format=]` — Output format. **Examples:** ```bash wp ias bundle-deals show 12 --format=json ``` **Related:** `wp ias bundle-deals create`, `wp ias bundle-deals delete`, `wp ias bundle-deals inspect`, `wp ias bundle-deals list`, `wp ias bundle-deals sync`, `wp ias bundle-deals update`, `wp ias bundle-deals validate` --- ### `wp ias bundle-deals sync` Re-sync a bundle to its linked (hidden) WooCommerce product. Delegates to IAS\BundleDeals\BundleProduct::sync_product(), which creates or updates the hidden WC_Product_Simple that powers native cart/checkout. Use this to repair drift between a bundle definition and its linked product. **Synopsis:** `wp ias bundle-deals sync [--yes] [--force] [--dry-run] [--format=]` **Options:** - `` — Bundle ID. - `[--yes]` — Skip the confirmation prompt (suite-standard for write commands). - `[--force]` — Alias for --yes — re-sync without the confirmation prompt. - `[--dry-run]` — Report what would be synced without writing anything. - `[--format=]` — Output format. **Examples:** ```bash wp ias bundle-deals sync 12 wp ias bundle-deals sync 12 --yes wp ias bundle-deals sync 12 --dry-run ``` **Related:** `wp ias bundle-deals create`, `wp ias bundle-deals delete`, `wp ias bundle-deals inspect`, `wp ias bundle-deals list`, `wp ias bundle-deals show`, `wp ias bundle-deals update`, `wp ias bundle-deals validate` --- ### `wp ias bundle-deals update` Update fields on an existing bundle. Delegates to IAS\BundleDeals\Database::update_bundle(); only the fields you pass are changed. Re-validates products and discount when supplied. **Synopsis:** `wp ias bundle-deals update [--name=] [--products=] [--discount=] [--enabled[=]] [--dry-run] [--yes] [--format=]` **Options:** - `` — Bundle ID. - `[--name=]` — New bundle name. - `[--products=]` — New comma-separated WC product IDs (validated as for `create`). - `[--discount=]` — New discount specification (`percent:`, `fixed:`, or `bundle:`). - `[--enabled[=]]` — Set the active state. `--enabled` enables; `--enabled=0` disables. - `[--dry-run]` — Validate and report what would change without writing anything. - `[--yes]` — Skip the confirmation prompt. - `[--format=]` — Output format. **Examples:** ```bash wp ias bundle-deals update 12 --discount=percent:20 wp ias bundle-deals update 12 --products=12,34,99 --enabled=0 --dry-run ``` **Related:** `wp ias bundle-deals create`, `wp ias bundle-deals delete`, `wp ias bundle-deals inspect`, `wp ias bundle-deals list`, `wp ias bundle-deals show`, `wp ias bundle-deals sync`, `wp ias bundle-deals validate` --- ### `wp ias bundle-deals validate` Validate a bundle's integrity (products exist, prices/discount sound, synced). **Synopsis:** `wp ias bundle-deals validate [--format=]` **Options:** - `` — Bundle ID. - `[--format=]` — Output format. **Examples:** ```bash wp ias bundle-deals validate 12 --format=json ``` **Related:** `wp ias bundle-deals create`, `wp ias bundle-deals delete`, `wp ias bundle-deals inspect`, `wp ias bundle-deals list`, `wp ias bundle-deals show`, `wp ias bundle-deals sync`, `wp ias bundle-deals update` ---