| 开发者 |
devhasib
webtendhq |
|---|---|
| 更新时间 | 2026年10月2日 11:59 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
{pct} token to show the exact discount, for example "Save 30%".{qty} token to show the quantity left, for example "Only 3 left!".{pct} and {qty} tokensbadgify_render_badge to hide a specific badge in codebadgify_rule_map to register your own custom rule typestemplates/badge.php from the plugin to your-theme/badgify/badge.php to change the badge HTML/wp-content/plugins/, or install it from Plugins > Add New by searching for "Storzen Product Badge Rules".Create a badge with the On Sale rule and set the label to something like Save {pct}. The {pct} token is replaced with the real discount, for example "Save 30%".
Create a badge with the Low Stock rule and use a label such as Only {qty} left!. The badge appears when stock reaches your threshold, which you can set per badge or globally under Rule.
Yes. Use the New Arrival rule and choose how many days a product counts as new. The default is 30 days.
Yes. Each badge has optional Active From and Active Until dates. Outside that window the badge is hidden automatically.
In the free version, one badge (the highest-priority match) is shown per product. Multi-badge stacking is part of the Pro version.
Yes. Sale detection, stock levels and the other rules work with simple and variable products.
No. All active badges are loaded with one database query, cached, and evaluated in memory. There are no per-product queries on the front end and no front-end JavaScript.
Yes. The plugin declares compatibility with WooCommerce HPOS.
Badges are added through the standard WooCommerce hooks woocommerce_before_shop_loop_item_title and woocommerce_before_single_product_summary, so it works with themes that use the default WooCommerce product loop and single product templates. Product layouts built entirely with block-based product collections may not fire these hooks.
Open Display and enable Replace WooCommerce Sale Flash. The default "Sale!" bubble is hidden whenever a sale badge from this plugin is shown.
Increase Badge Z-Index under Display.
Copy templates/badge.php from the plugin folder to your-theme/badgify/badge.php. The plugin uses your copy automatically.
{pct} becomes the discount percentage on On Sale badges, for example "30%". {qty} becomes the current stock quantity on Low Stock badges, for example "3".
{pct}), new arrival, featured, low stock ({qty}), out of stock, hot seller.badgify_rule_map / badgify_render_badge developer filters.