| 开发者 | deftcoders |
|---|---|
| 更新时间 | 2026年3月15日 16:27 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPL-3.0-or-later |
| 版权网址: | 版权信息 |
wp-content/uploads/wcdpdr-logs/. One file per day. Each entry shows the cart state at evaluation time, every rule evaluated (conditions met or not, amount applied), any Stop Further Rules trigger, and any execution error. Logs are viewable from the Debug Logs admin page and can be cleared with one click. The log directory is protected from direct browser access by a .htaccess file written automatically on first use.
Import / Export
Export all rules — or a selected subset via bulk export — to a JSON file. Import on any site. Every rule is validated before saving and all fields are sanitised. The 5-rule free limit is respected automatically; imports are trimmed to available slots.
Clean Uninstall
When you delete the plugin via the WordPress admin, it removes everything it created: both database tables, all plugin options, all transients, and the entire log directory. On Multisite, cleanup runs for every sub-site.
Performance
Active rules are cached in a 60-second WordPress transient; no database query fires on each cart recalculation. The cache busts immediately whenever a rule is saved, deleted, or its status toggled. Product category conditions use a single batched query across all cart products rather than one query per line item.
Compatibility
FeaturesUtil::declare_compatibility(); all order reads/writes use the WooCommerce order object APIwc_format_decimal() and rounded with wc_round_tax_total()deftcoders-dynamic-pricing-conditional-fees folder to /wp-content/plugins/ via FTP.Yes. WooCommerce 6.0 or higher must be installed and active. The plugin checks on every load and deactivates itself automatically if WooCommerce is missing.
PHP 7.4 or higher. If the requirement is not met the plugin shows an admin error notice and loads nothing.
The free version supports up to 5 rules (active and inactive combined). The UI shows a warning when you have reached the limit and blocks creating more until you delete an existing rule.
Yes, with full control. Each discount rule has a Stackable setting. Stackable (default) calculates against the full cart subtotal regardless of other discounts. Non-stackable calculates against the subtotal minus discounts already applied in the current cycle. Combine this with Stop Further Rules to prevent any stacking at all.
Yes. It stops all rule evaluation — fee and discount rules alike — for every rule that follows in priority order. Once it fires, the loop breaks completely.
Two ways. The Rule Simulator lets you enter fake cart data and see results instantly — nothing touches any real session. Preview Mode (Settings) runs the full engine on real customer carts but applies nothing; combine it with Debug Mode to log exactly what would have fired.
A countdown timer banner appears on the cart when a discount rule has a time-based condition (Day of Week, Date Range, or Time Range). For Day of Week rules it counts down to midnight. For Date Range rules it counts down to 23:59 on the end date. For Time Range rules it counts down to the end time. The timer updates every second via JavaScript.
In wp-content/uploads/wcdpdr-logs/, one file per day named wcdpdr-debug-YYYY-MM-DD.log. The directory is protected from direct browser access via an auto-created .htaccess file. You can view and clear logs from the Debug Logs tab in the admin.
Yes. The plugin calls FeaturesUtil::declare_compatibility( 'custom_order_tables', ... ) and uses the WooCommerce order object API for all order reads and writes — no direct wp_posts queries.
Everything is removed cleanly: both database tables, all plugin options, all plugin transients, and the log directory. On Multisite this runs for every sub-site automatically.
Yes. Click Export on the rules list page (or use bulk export for specific rules) to download a JSON file. On the destination site use Import to upload it.
The uninstall routine runs per-site on Multisite, cleaning up data for each sub-site. The plugin itself operates per-site (rules are stored per-site in the standard WordPress manner).
wp-content/uploads/wcdpdr-logs/, in-admin viewer with date selector, Clear All. Log directory .htaccess protected..pot file included.