Mailchimp Banner | Q3 2024

added by Latoya. Used for Q2 and Q3 tracks IDs for Q2: sitewide_banner_mailchimp_q2_2024 tracks ID for Q3: sitewide_banner_mailchimp_q3_2024

Dynamic Pricing for WooCommerce

Bulk discounts, role-based pricing and much more

Pourcentage discount not working as expected

I am encountering an issue when using “PPOM for WooCommerce” module + “Dynamic pricing” module.

When the woocommerce hook `woocommerce_before_calculate_totals` is called several times, the discount applied using the “Pourcentage discount” mode on products is incorrect.

This issue happened to me when using this module with another module (PPOM for WooCommerce).
The second module is triggering the woocommerce `$cart->calculate_totals()` which is triggering the `woocommerce_before_calculate_totals` hook twice on page load.

You should consider to fix your module by adding a `remove_action( ‘woocommerce_before_calculate_totals’, [$this, ‘on_calculate_totals’], 98 );` after the first call of the hook.

The issue can be reproduced just by installing both modules and setting a dynamic price on a product using the “Pourcentage discount” mode.

Thank you

Author

davidfoures2

Current Status

Open

Last updated: January 31, 2023

0 comments

Log in to comment on this feature request.