Advanced Dynamic Pricing For WooCommerce

Developers FAQ

This guide collects the most frequent technical questions about the Advanced Dynamic Pricing for WooCommerce plugin. It is written specifically for developers who need to extend the plugin, debug custom code, or integrate it with third‑party solutions. Use this page as a reference when you work with hooks, custom fields, taxonomies, or other development‑related tasks.


Custom Taxonomy Ignored at Frontend

You register a custom taxonomy for products, but Advanced Dynamic Pricing does not recognise it on the frontend. Filtering by this taxonomy in discount rules has no effect.

The plugin’s internal logic runs at a certain point during WordPress initialisation. If your custom taxonomy registers too late (for example, with the default priority 10), the plugin may not detect it.

Solution
Reduce the priority of your add_action call that registers the custom taxonomy. A value of 9 (or lower) ensures your taxonomy is available before the plugin needs it.

Why this works
WordPress executes hooks in order of priority, from lowest number to highest. The Advanced Dynamic Pricing plugin uses the standard init hook to collect taxonomies. By giving your custom taxonomy a priority lower (i.e., earlier) than the plugin’s default priority (10), you make the taxonomy available when the plugin queries for it.


Understanding Priority Values

Priority valueEffect
1–9Runs very early. Use this for critical registrations (custom post types, taxonomies) that other plugins depend on.
10Default priority. Most plugins, including Advanced Dynamic Pricing, use this value.
11–999Runs later. Useful when you need to override something that another plugin registered at priority 10.
PHP_INT_MAXRuns as late as possible. Use only when you must force your code to run after everything else.

Best practice: Always use the smallest priority value that works. Extremely high values (like PHP_INT_MAX) can make debugging difficult and may cause unpredictable conflicts.


 How do I export or import pricing rules programmatically?

The Pro version stores rules in the _wdp_rules database table. You can export this table using phpMyAdmin or a custom script. For a safer, code‑based approach, use the import/export function described in our developer documentation.

The plugin ignores my custom product field in rule conditions.

Ensure your custom field is stored as product meta and that the meta key is correct. Then, in your pricing rule, select Custom field as the condition type and enter the exact meta key. If the field still does not appear, check that you have saved a value for at least one product (the plugin only shows fields that already exist in the database).

My custom filter callback does not run.

Common causes:

  • Misspelled hook name.
  • Wrong priority (the hook fires before your callback attaches).
  • The hook is conditionally loaded (e.g., only on admin pages).

Use error_log() inside your callback to confirm whether it executes.

How do I debug why a pricing rule does not apply?

Enable the built‑in debug bar in Pricing Rules → Settings → Debug. The debug panel shows you exactly which rules affect a product and which conditions fail.


Further Resources

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