Directory / plugin
WriteLeash
v0.3.0 · by duyytrann
See WooCommerce price changes before they go live. Keep newer edits, undo eligible prices, and leash restricted agents.
About this plugin
One bulk edit can turn a $199 product into $19. WriteLeash shows you the new prices first. The catalog stays put until you approve.
Look before you change it
Pick simple products or variations. Preview the regular price and the sale price, then approve and Apply. Walking away from Preview changes nothing.
Keep the newer edit
If the stored price WriteLeash is changing or another checked setting no longer matches the preview, WriteLeash leaves the newer value alone and marks that product as a conflict.
A later price or setting change becomes a conflict instead of a blind overwrite. The product name, SKU and category are reference details only. Changing them alone does not conflict.
Take back an eligible price
History shows what finished, what conflicted, and what can be undone. Eligible Undo puts a price back when the saved details and the product still allow it. Stock Undo is not supported. Orders, completed sales, emails, webhooks, and other plugins stay as they are.
Give an agent a job, not the keys
Choose the products, the price or stock limits, how much work, and when the access expires. Pause or revoke it when you are done. Ordinary price jobs do not change stock. Stock moves only after you issue a grant, and that switch stays off until you do.
A seatbelt, not a firewall: a restricted WordPress principal is bounded to WriteLeash’s controlled price and stock job path. Documented monitored WooCommerce write paths are denied outside a matching Execution Frame. Direct SQL, hostile plugins, and unmonitored write paths are not covered. This is not a universal fail-closed guarantee when the grant store is unavailable. It is not a sandbox or universal agent-safe guarantee.
A restricted user can run through cron, Action Scheduler, or WP-CLI as that user. A system cron on user 0 is outside the grant. Administrators who are not on the grant are outside it too. The account cannot remove its own restriction.
Price changes shop owners actually run
- Set a price, add or subtract an amount, or change it by a percentage.
- Regular Price or Sale Price. A variable product means its variations.
- A regular-price change keeps the current sale price and its dates.
- Clear a sale price to blank, not zero.
- Filter by the stored price, then exclude products before approval. Exclusions stay out of Apply and Undo.
- Optional .99, .95, .90, or whole endings use the same safety limits.
- Resume a stopped job without repeating changes that already finished.
A safety limit can skip one item or refuse the whole Preview. Stored prices in the plan are not a promise of the price a shopper sees. Change the setup, then Preview again before Apply.
Requirements
- WooCommerce 10.0 through 11.x on WordPress 7.0 up to 8.0 only (10.0.0 or newer, below 12.0.0).
- Exercised: WordPress 7.0.1 and 7.1.2 on that line; WordPress 6.7.2 with WooCommerce 9.0.4; WordPress 6.8.3 with WooCommerce 9.9.7. Legacy band is WordPress 6.7 below 7.0 with WooCommerce 9.0.0 below 10.0.0. Other pairs are refused before a job is created.
- PHP 7.4 or newer. PHP 7.4.33, 8.0.30, 8.1.34, and 8.2.34 were exercised.
- MySQL 8.0.44 and MariaDB 10.11.15 were exercised.
What is supported
- Up to 1,000 selected products per new job in the tested configuration. Variations count individually.
- Published core simple products and published variations of published core variable products, in the base store currency. Parent prices are not edited directly.
- WooCommerce refreshes variable parent price ranges after each variation change.
Current limitations
- Custom product types and universal extension compatibility are unsupported.
- Multisite is unsupported.
- Real managed or shared hosting has not been tested.
- This does not cover direct SQL, hostile plugins, or unmonitored writes. Undo does not reverse orders or outside effects.