Deactivate expired and used-up voucher codes
Years of old discount codes are cleaned up safely, and only the live ones stay active.
What it replaces: 1-2 h of clicking through the discount settings
What you write to Claude
„find codes that are expired or used up but still marked active and switch them off. don't delete anything”
The problem
The discount settings list 300 codes from campaigns over the years. Half are dead, and nobody dares to clean them up.
What Claude does
- Claude lists all discount codes with their dates and remaining uses.
- It picks those that are expired or used up but still switched on.
- You see the list and approve; the codes are switched off, not deleted.
What you get
Only live codes stay active. The old ones remain in PrestaShop as inactive, with their history.
You stay in control
You see the list before anything changes and nothing happens without your yes. Codes are never deleted, only switched off, so order history keeps them. Prices, discounts and stock stay switched off until you turn them on, and unusually large changes need an extra confirmation.
Related use cases
For developers
- Area
- 2 · Commerce
- Connector
- daily connector
- In the free Audit
- no, paid version only
- For
- Marketer / SEO, Agency / freelancer, Store owner
- Tools
- ps_manage_cart_rules
Step by step
- Lists cart rules with ps_manage_cart_rules (action list): code, dates, usage limits, status.
- Selects codes that are active but past their end date or with no uses left.
- Shows the list and calls action set_active with active off, with a preview.
- After your approval, deactivates them and gives you the operation ID.
Safety
Commerce (block 2) runs on the daily connector, is off after installation and has its own switch. Claude acts as the connector's PrestaShop employee, so the action must also be allowed in that employee's profile. Every write shows a preview, runs only after your approval (single-use token valid 30 minutes, blocked if the data changed in the back office in the meantime), is logged in the change history and can be undone with ps_revert_change. Codes are never deleted, only deactivated, so order history keeps the code that was used.
Last updated: 2026-10-05