| 开发者 |
predragvujnovic88
freemius |
|---|---|
| 更新时间 | 2026年9月1日 23:56 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[drbu_tiered_buy_box] shortcode for use on any page, or automatic replacement of the default "Add to cart" button.drbu_tier_total — override tier price calculations.drbu_pack_discounts_enabled — enable/disable discounts based on custom conditions.templates/tiered-buy-box.php to your theme at woocommerce/tiered-buy-box.php..drbu-buy.[drbu_tiered_buy_box] on any page or post.Discounts are calculated dynamically based on your chosen pricing model (Percentage or Fixed amount per additional unit). When a customer selects a multi-pack, the discount is automatically applied to the cart line item.
Yes. In Discount Rules Box → Specific Product Restrictions, search and select specific product IDs or categories (Pro feature). Leave it blank to apply to all simple products.
Yes! The plugin applies discounts natively to the WooCommerce Cart object (WC_Cart), making it fully compatible with Block Checkout, Classic Checkout, and WooCommerce High-Performance Order Storage (HPOS).
The "Replace default Add to cart button & price header" option automatically removes both the standard add-to-cart form and old price header when the buy box is active.
Yes! You can use our 1-Click Quick Language Presets in the settings dashboard or customize every string manually (CTA buttons, badge texts, stock labels, notes, shipping prefixes). A .pot translation file is also included in /languages/.
Yes! You can place [drbu_tiered_buy_box] anywhere on your site. To specify a product, use [drbu_tiered_buy_box id="123"].
No. The Free version is a fully working plugin for a 2-pack buy box (1 & 2 pieces) with automatic cart discounts and full display/text customization. Pro features are additive: a 3rd pack tier, the Analytics dashboard, Appearance customization, product/category restrictions, and 1-click language presets.
From your admin, open Discount Rules Box → License and click Start 30-Day Free Trial (no credit card required), or open the Upgrade tab to buy a plan directly. The trial unlocks every Pro feature for 30 days. After the trial you can purchase a Pro license or continue using the Free version.
slug was updated from discount-rules-box to drbu-discount-rules-box, matching the product slug now set on the Freemius Dashboard — keeps the Free package's own folder name and Freemius's update mechanism aligned with the plugin's actual name/slug going forward.premium_slug in the Freemius SDK config, so a Pro install lives in its own folder (drbu-discount-rules-box-for-woocommerce-premium) instead of sharing the Free version's folder name — prevents a folder collision if a site ever has both installed during an upgrade.wp_org_gatekeeper build-time marker, per Freemius's own integration instructions for the auto-generated Free ZIP (removed automatically from the Free package by Freemius's Deployment tool; has no effect on the GA/Premium code)._delete_account()) that doesn't actually exist. Now uses Freemius's own native deactivation flow directly, verified live to actually deactivate the license and revert the site to the Free plan.$hook_suffix for a submenu page from its page title rather than its slug in some cases — for Analytics that produced discount-rules-box_page_discount-rules-box-upsell-analytics, which doesn't contain "drbu" anywhere, so the plugin's own check for "is this one of my admin pages" never matched. Fixed by also matching the Analytics page's own slug explicitly (now a shared DRBU_Settings::ANALYTICS_SLUG constant), in both the CSS/JS enqueue check and the favicon check.remove_submenu_page(), were completely inaccessible ("Sorry, you are not allowed to access this page") even to administrators — this broke the "Manage Billing"/"Open Customer Portal" links on the plugin's own Account tab, and the redirect Freemius sends after a successful trial/license activation. Switched to hiding those sidebar links with CSS instead, which keeps the pages themselves fully functional.<script> tag for the live preview builder, regardless of which tab was open. The secret field is now stripped out of that JS data.is_premium was hardcoded to false in the Freemius SDK init call (discount-rules-box-upsell.php). This is a separate mechanism from the __premium_only file/method stripping — Freemius's Deployment tool does not rewrite this literal automatically — so Freemius::is_premium(), and therefore is__premium_only() (which every __premium_only-gated feature in this plugin checks before rendering: 3rd tier, Appearance panel, restriction pickers, Sales Analytics), could never return true, for any user, including a real customer with a fully valid paid license. Changed to dynamically detect the running package by checking whether a __premium_only file physically exists on disk — true in the Premium package, false in the Free package, exactly mirroring how Freemius's own stripping already works.trial: false (instant purchase, no trial) — they're now "Start 30-Day Free Trial" buttons using the same trial-first checkout flow already used everywhere else in the plugin.__premium_only refactor that every other Pro-gated feature already correctly nudges toward "Start Free Trial", and brought these two in line for consistency.manage_options while the rest of the License tab only requires manage_woocommerce, so a Shop Manager's click silently did nothing.Version: header and DRBU_VERSION constant had fallen behind this readme's Stable tag/changelog since 2.9.36 (only the built ZIP's copy was ever version-stamped, not the tracked source file).drbu_license_last_sync option orphaned in the database.build.sh now also produces an unpacked, ready-to-inspect copy of the release (release/drbu-discount-rules-box-for-woocommerce/) alongside the ZIP..scss source files under the bundled Freemius SDK's assets/scss/ folder (the compiled .css the SDK actually loads already ships separately) and a root-level keyword.csv working file. Both excluded from build.sh.class-drbu-settings.php, gated only by a runtime license check — same "Pro code physically present, merely disabled" pattern already fixed elsewhere in 2.9.36. Extracted into render_analytics_page__premium_only(), physically stripped from the Free ZIP by Freemius's deployment pipeline; Free users still see only the existing "Analytics is a Pro Feature" upsell panel.patches/ folder (a Composer patch file, not needed at runtime) was shipping inside the built ZIP; excluded from build.sh.[drbu_tiered_buy_box], per WordPress.org's unique-naming guideline. The previous generic tags ([tiered_buy_box], [order_now_5], [poruci_odmah_5], [poruci_odmah_4]) were removed — the plugin has no published users yet, so no back-compat aliasing was needed.__premium_only-suffixed methods (the real Freemius SDK convention, freemius()->is__premium_only()), which the Freemius deployment pipeline physically strips from the Free ZIP.admin_menu priority 999 — far earlier than Freemius's own priority (999999999) for registering them — so the removal silently had nothing to remove yet. Now runs after Freemius registers its menu items.__premium_only convention instead of being shipped everywhere and hidden behind a runtime check — required by WordPress.org's guideline that no disabled/locked code may exist in the hosted Free version.disabled attribute standing between a Free install and using it. It's now served from the backend only when a Pro license is active.wp_add_inline_style() instead of being echoed as a raw <style> tag.X-Signature header and the field is documented as your product's own Secret Key (Freemius Dashboard → your product → Settings), matching Freemius's own reference implementation.license.deleted, which is what happens when a license is removed from the Freemius Dashboard. The list now matches Freemius's real event catalog.wp-header-end markers after the dashboard and Analytics page headers so WordPress positions any remaining admin notices below the header instead of injecting them in the middle of it.meta_query instead of raw meta_key/meta_value query args, resolving the "possible slow query" notices from WordPress Plugin Check.null version on the externally-hosted Freemius checkout script so WordPress Plugin Check no longer flags it as a missing resource version.Freemius::get_sites(), which is an unrelated WordPress multisite helper (returns network subsites, always empty on a normal single-site install) — not the license's actual activation count. Now reads the real activated count from the license object.module_id field that the Freemius SDK requires internally to register its license-activation handler — without it, the server silently never registered the handler and WordPress returned an empty error response. The request now includes module_id, so activation reaches Freemius correctly.public_key hardcoded in the plugin (pk_dfe22e467625e3754b0f91553f0f6) did not match the current key shown in the Freemius Developer Dashboard's integration snippet (pk_1ed69d2634756f08c2a7bf2187d37), so every signed request to the Freemius API (pricing widget, license sync, trial activation) was rejected with "Invalid Authorization header" — trials/purchases never unlocked Pro, and the in-dashboard pricing widget stayed stuck loading. Corrected in all three places it was hardcoded.after_license_change / after_account_connection hooks.sk_...) and hosting firewall whitelisting for api.freemius.com.sk_...) in License settings tab enabling instant 1-click Pro & trial activation.drbu-open-trial) ensuring 30-day trial CTA opens 0-cost free trial modal without prompting for credit card details.pk_dfe22e467625e3754b0f91553f0f6) resolving pricing API authentication rejection.woocommerce) so pricing, trial, and checkout pages load natively in WordPress Admin.uninstall.php file in accordance with Freemius release requirements.DRBU_License now wraps the Freemius SDK (can_use_premium_code()) with a graceful fallback when the SDK is absent; Pro gating is centralized in DRBU_Settings (pro_free_values()).unit_price × quantity matches total price down to the exact sub-currency unit for fiscal compliance.#HEX) with uppercase formatting and auto-prefix # handling in Step 3 Appearance settings.[poruci_odmah_5] and [poruci_odmah_4]..pot catalog.