Advanced Dynamic Pricing For WooCommerce

Compatibility code for some popular themes

The Advanced Dynamic Pricing for WooCommerce plugin works seamlessly with almost any properly coded WooCommerce theme. However, some themes deviate from standard WooCommerce template structures or JavaScript event handling. These deviations can occasionally cause minor display issues – for example, a missing discount badge, a bulk pricing table that does not appear, or prices that do not update when a customer changes a product quantity on a variable product page. This guide explains the most common theme‑related problems and provides specific solutions for popular themes such as Flatsome, Divi, Kadence, and Shoptimizer.

Note: The compatibility code and shortcodes described in this guide work with both the free and Pro versions of Advanced Dynamic Pricing for WooCommerce.


Quick Diagnostic Steps

Before applying any theme‑specific code, perform these quick checks to identify the root cause.

  1. Temporarily switch your active theme to a default WordPress theme, such as Storefront(WooCommerce’s official parent theme) or Twenty Twenty‑Four.
  2. Visit the product page or shop archive where you expect the discount badge or bulk table to appear.
  3. If the issue disappears under a default theme, the problem is theme‑specific, and you can safely apply the solutions below.
  4. If the issue persists under a default theme, the problem likely involves another active plugin. Proceed to deactivate other plugins one by one while keeping the default theme active.

Best practice: Always perform this diagnostic process in a staging environment before making changes to your live site.


General Theme Compatibility: Using Shortcodes

Some themes do not fully support the WooCommerce hooks that the plugin uses to automatically display bulk pricing tables on product pages or category pages. In such cases, you can manually place the bulk tables using two dedicated shortcodes.

  • [adp_product_bulk_rules_table] – Displays the bulk pricing table for a specific product. Use this shortcode on the individual product page template or directly in the product description field.
  • [adp_category_bulk_rules_table] – Displays the bulk pricing table for a product category. Use this shortcode in the category description or in a custom archive template.

How to use the shortcodes

  1. Edit the product where you want the bulk table to appear.
  2. In the Product description field, enter the shortcode [adp_product_bulk_rules_table].
  3. Update the product. The bulk table will now appear within the product description area.
  4. For category pages, edit the relevant product category. In the Category description field, enter [adp_category_bulk_rules_table].

Parameter support: Both shortcodes accept the same parameters as the standard WooCommerce [products] shortcode. For example, you can limit the table to specific products or categories using the ids or category parameters.


Flatsome Theme: Fixing the Percentage Badge

The Flatsome theme is highly customisable and popular among WooCommerce users. However, the theme includes its own sale badge styling that may override the dynamic percentage badge generated by Advanced Dynamic Pricing. Fortunately, Flatsome provides a built‑in setting to enable percentage‑based sale badges.

Step‑by‑step fix

  1. In your WordPress admin, go to Appearance → Themes → Flatsome.
  2. Click the Customize button.
  3. Navigate to WooCommerce → Product catalog.
  4. Scroll to the bottom of the options list.
  5. Locate the setting labelled “Enable % instead of ‘Sale!’” and toggle it ON.
  6. Click Publish to save the change.

After enabling this setting, the Flatsome theme will display dynamic percentage badges for all sale products, including those discounted by Advanced Dynamic Pricing rules.

Why this works: Flatsome’s built‑in setting replaces the static “Sale!” text with a computed percentage based on the difference between the regular price and the sale price. When Advanced Dynamic Pricing modifies the sale price, Flatsome correctly recalculates the percentage.


Divi Theme: Fixing “Update Price When User Changes Quantity”

The Divi theme by Elegant Themes includes a feature that allows product prices to update dynamically when a customer changes the quantity in the product page quantity field. However, this feature may not work correctly when Advanced Dynamic Pricing applies tiered or quantity‑based discounts. The price stays static, and the customer does not see the discounted amount until they add the product to the cart.

The solution requires a small custom JavaScript snippet that forces Divi to re‑evaluate the price after a quantity change.

Step‑by‑step fix

  1. Identify where to place the code. You can add it to your child theme’s functions.php file or use the free Code Snippets plugin.
  2. Add the following PHP code, which enqueues the necessary JavaScript only on product pages:

If the “Update price when user changes qty” parameter doesn’t work in the Divi theme you need to use the following code:

  1. Test the fix. Open a variable product that has a tiered discount rule (e.g., 10% off for 3+ units). Change the quantity in the product page. The displayed price should update immediately to reflect the discount.

Note: This fix only affects the product page. Cart and checkout price calculations use different hooks and should work correctly without additional code.


Kadence Theme: Fixing the Sale Badge for Variable Products

The Kadence theme, together with the Shoptimizer theme (see below), may fail to display the sale badge on variable products even when a discount rule actively applies. Enabling the plugin’s built‑in option “Calculate ‘On Sale’ badge for variable products” does not always resolve the issue. In these cases, a small custom filter forces WooCommerce to recognise the discounted status correctly.

Step‑by‑step fix

Add the following PHP code to your child theme’s functions.php file or via the Code Snippets plugin:

Step‑by‑step implementation

  1. Log into your WordPress admin area.
  2. Go to Plugins → Add New and install the free Code Snippets plugin, or prepare your child theme’s functions.php file.
  3. Add the code as a new snippet (or paste it at the bottom of functions.php).
  4. Activate the snippet (or save the file).
  5. Visit any variable product that qualifies for a discount. The sale badge should now appear correctly.

Shoptimizer Theme: Same Fix as Kadence

The Shoptimizer theme, a high‑performance WooCommerce theme by CommerceGurus, exhibits the same behaviour as Kadence: the sale badge for variable products may not display even when a discount rule applies. The same code from Section 5 works for Shoptimizer as well.

Implementation: Follow the exact same steps described in Section 5. The code affects both Kadence and Shoptimizer equally.

Why this works for both themes: Both Kadence and Shoptimizer use a similar approach to determine when to display the sale badge for variable products. Pre‑calculating the discount with adp_functions()->calculateProduct() ensures WooCommerce recognises the discounted price before the theme checks the sale status.


When a Theme Does Not Support WooCommerce Hooks

Some themes, particularly older or custom‑built ones, do not properly execute WooCommerce’s default hooks (e.g., woocommerce_single_product_summary or woocommerce_before_add_to_cart_button). When this happens, the plugin cannot automatically inject the bulk pricing table or the discount badge.

Symptoms

  • The bulk pricing table does not appear on product pages, even though you enabled it in the plugin’s settings.
  • The discount badge displays only on simple products but not on variable products.
  • Price updates after quantity changes do not work.

Solution

Manually insert the required shortcodes directly into your theme’s template files.

Step‑by‑step for the bulk pricing table

  1. Identify the template file that controls your product page layout. Common locations include single-product.php or content-single-product.php inside your theme’s /woocommerce/folder.
  2. Locate the spot where you want the bulk table to appear (typically after the product price or near the add‑to‑cart button).
  3. Insert the following PHP code:
  1. Save the file and refresh the product page.

If you prefer not to edit template files, you can place the shortcode directly in the Product short description field in the WordPress editor. However, the shortcode will only execute if your theme respects shortcodes in that field.


If You Still Experience Issues

If none of the theme‑specific fixes resolve your problem, we encourage you to submit a support ticket through our helpdesk. When you do, include the following information:

  • The name and version of your active theme (and whether it is a child theme).
  • The version of the Advanced Dynamic Pricing for WooCommerce plugin (free or Pro).
  • A list of other active plugins, especially any that modify product prices or the checkout process.
  • A clear description of the issue (for example, “The sale badge for variable products does not appear on the product page”).
  • A screenshot of the affected page.

If you use a commercial theme or plugin, please attach the .zip file of that product to the ticket. This allows our support team to reproduce the issue in a test environment and provide an accurate fix.

Important: Always create a full backup of your site before making any changes to theme files or adding custom code.


Summary

ThemeIssueSolution
General (any theme)Bulk pricing table does not appear automatically.Manually add [adp_product_bulk_rules_table] or [adp_category_bulk_rules_table]shortcode.
FlatsomePercentage badge does not display.Enable “Enable % instead of ‘Sale!’”in Theme Customizer → WooCommerce → Product catalog.
DiviPrice does not update when customer changes quantity.Add the inline JavaScript snippet from Section 4.
Kadence / ShoptimizerSale badge missing for variable products.Add the woocommerce_before_single_productcode from Section 5.
Any themeTheme does not support WooCommerce hooks.Manually insert do_shortcode in template files.

Some themes doesn’t support Woocommerce hooks, so you should add shortcodes [adp_category_bulk_rules_table] and [adp_product_bulk_rules_table] to necessary page templates (or directly to product description) OR you can submit new ticket to helpdesk. If you use paid plugin/theme — please, upload it (as.zip file) to the ticket!

Have questions? Please submit a support request. We're always happy to help!

Advanced Dynamic Pricing
for WooCommerce
PRO

From $60
Buy
✓ 30-day money-back guarantee