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
Open
Last updated: January 31, 2023
0 comments
Log in to comment on this feature request.