Questions about the Rules
This guide collects the most common questions about how discount rules behave in the Advanced Dynamic Pricing for WooCommerce plugin. You will find solutions for issues with the bulk table, product page pricing, out‑of‑stock products, payment method loopholes, template customisation, and WPML translation. Use this page as a quick reference to resolve rule‑related problems and optimise your discount setup.
Wrong price in bulk table when coupon replacement is active
Symptom
When you enable the coupon replacement feature (sometimes called “auto‑apply coupons for dynamic discounts”), the bulk table displays incorrect prices. The table may show the full regular price or a wrong discounted amount.
Cause
The plugin uses a coupon to represent each discount. The default code that displays the bulk table does not account for the coupon‑based price reduction.
Solution
Add the following code to your child theme’s functions.php file or via the Code Snippets plugin.
|
1 |
add_filter('adp_show_bulk_table_prices_including_coupons', '__return_true'); |
What the code does
The filter forces the bulk table to include the coupon‑based discount when it calculates the displayed prices.
Important side effect
After you add this code, the total price and the price for 1 unit on the product page become incorrect. The bulk table shows the correct price, but the page totals are not right. This behaviour is expected when you use this hook. Use it only when you absolutely need the bulk table to show the correct discounted prices.
How does the plugin calculate product prices on category and product pages?
The plugin determines prices using the following process:
- It puts one unit of the product into the current shopping cart.
- It applies all active pricing rules to that cart.
- It uses the modified price for display.
Pro version option: “Displayed product price ignores the cart”
If you want the price calculation to ignore the current cart content (for example, to show the discount without any interference from other cart items), enable the “Displayed product price ignores the cart” setting inside Pricing Rules → Settings → Product price.
When this option is active, the plugin uses an empty cart for the calculation. This is often the correct behaviour for discount tables and badges. A detailed description of the feature is available on the plugin’s documentation site.
Why does the bulk table show the same price for all quantity ranges?
Cause
Your product has a sale price that is lower than the discounted regular price. You also use the “Best between discounted regular price and sale price” calculation mode. In this mode, the plugin chooses the best (lowest) available price for each quantity. If the existing sale price is already lower than any tier price, all tiers show the same value.
Solution
- Go to Pricing Rules → Settings → Calculation.
- Find the option “How to apply rules to a product that already has a sale price”.
- Change the calculation mode to “Discount regular price” (apply the rule on the original price) or “Discount sale price” (apply the rule on the sale price).
- Alternatively, remove the sale price from the product.
After you change the mode or remove the sale price, the bulk table will display the correct discounted prices for each tier.
Why does the bulk table not appear for out‑of‑stock products?
Why this happens
When a product is out of stock and does not allow backorders, WooCommerce does not call the default hook that normally triggers the bulk table display.
Solution
Use the plugin’s Customizer to change the position of the bulk table.
- Go to Pricing Rules → Customizer → Product Bulk Table → Options.
- Set the position to “Above product meta”.
- Click Publish.
After you change the position, the bulk table will also appear for out‑of‑stock products (even when backorders are not allowed).
Customers cheat the payment method condition – how to fix it
Scenario
You create a discount rule that gives a 5% reduction only when the customer pays with PayPal or a credit card. A customer first attempts to pay with a credit card (which qualifies for the discount), the transaction fails, and then the customer switches to cash on delivery while still receiving the original discount.
Why this happens
WooCommerce allows customers to change the payment method for existing unpaid orders. When they switch to a non‑qualified method, the discount remains because it was already applied.
Solution
Add the following PHP code to your child theme’s functions.php file or via the Code Snippetsplugin. This code forces the original payment method to remain the only available gateway on the Pay for Order page.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
add_action('before_woocommerce_pay', function() { $order_key = isset($_GET['key']) ? $_GET['key'] : null; if (!$order_key) { return; } $order_id = wc_get_order_id_by_order_key($order_key); $order_id = absint($order_id); $order = wc_get_order($order_id); if (!$order) { return; } $payment_method = $order->get_payment_method(); add_filter('woocommerce_available_payment_gateways', function($gateways) use ($payment_method) { return isset($gateways[$payment_method]) ? array($payment_method => $gateways[$payment_method]) : array(); }, 10, 1); }); |
After you add this code, the customer sees only the originally chosen gateway on the payment page and cannot switch to a different payment method after the discount has been applied.
How to customise bulk table templates
The plugin stores the bulk table HTML in template files. You can override these files in your theme to change the table’s layout, style, or content.
Step‑by‑step instructions
- Copy the necessary files from the plugin’s
templatesfolder.
(Example:wp-content/plugins/woocommerce-dynamic-pricing/templates/) - In your active theme (preferably a child theme), create the following folder:
advanced-dynamic-pricing-for-woocommerce - Paste the copied files into that folder.
The plugin automatically detects your theme’s version of the templates and uses them instead of its own files. This way, your customisations survive plugin updates.
Discount rules do not apply to orders created via the “Add Order” button
Why this happens
The standard Add Order button in WooCommerce → Orders creates a new order directly in the database, bypassing the shopping cart. However, all pricing plugins (including this one) work by modifying cart items, not database records.
Solution
Do not use the native “Add Order” button for manual order entry. Instead, use the official Phone Orders for WooCommerce plugin, which integrates with the pricing rules system. With Phone Orders, you can create admin‑side orders that respect all active discounts.
Cannot translate bulk table messages with WPML
The plugin works with the WPML translation plugin, but you must enable a specific setting for the bulk table strings to appear in the translation editor.
Step‑by‑step instructions
- Go to WPML → String Translation.
- Turn on the option “Allow WPML to translate dynamic phrases”.
- Also enable “Auto‑register strings for translation” (WPML documentation explains how to find strings that do not appear on the String Translation page).
- After you enable these two checkboxes, the bulk table messages become available for translation.
For more detailed instructions, refer to the WPML guide on “Auto‑register strings for translation”.
Need a custom cart condition not available out of the box
The plugin includes many built‑in cart conditions (subtotal, quantity, weight, user role, etc.). If you need a completely new condition that is not available out of the box, you must write custom PHP code.
Requirements
You need to be a PHP programmer, or you must hire one. The plugin provides a sample addon that demonstrates how to add a new condition.
How to proceed
- Review the sample addon in the plugin’s code samples section.
- Adapt the code to your specific condition.
- Test the custom condition on a staging site before deploying it to your live store.
If you need professional assistance, contact the plugin’s support team.