Running a sitewide sale shouldn't take an hour
Black Friday is tomorrow. You want every product 20% off. In WooCommerce, that means editing each product individually — set the sale price, save, next product. Or writing a bulk edit query and hoping you calculated the math right. Or installing a discount plugin with coupon rules, conditions, and scheduling.
For "everything is 20% off right now," all of that is overkill.
What most people do instead
A better way: one command, every product on sale
Open the navigator. Type discount -percent=20. Every product on the frontend instantly shows a 20% discount with the original price struck through and the sale price displayed. The database stays untouched — original prices remain exactly as they were.
Non-destructive. The discount applies at render time via WooCommerce price filters. Your database prices never change. Remove the startup command and prices revert instantly.
How it works
discount -percent=20 applies 20% off. Auto-registers as a startup command so the discount persists.| Detail | Value |
|---|---|
| Command name | discount |
| Set discount | -percent=20 (1-100) |
| Applies to | All products on product pages (simple + variable) |
| Display | WooCommerce sale formatting (strikethrough + sale badge) |
| Database impact | None — prices filtered at render time |
| Requires | WooCommerce active |
| Can be used in |
Real example
It's Black Friday morning. Your WooCommerce store has 340 products. The plan: 25% off everything for 72 hours.
You open the navigator and set a 25% discount. Every product page now shows the original price crossed out with the discounted price below it. WooCommerce's "On Sale" badge appears on catalog pages. Customers see the sale immediately.
Monday morning, the sale is over. You remove the startup command entry. Every product reverts to its original price. No bulk edits. No spreadsheet of "what was the old price?" No hours of cleanup.