I spent a few more hours )))
During the testing, there were interesting results.
I managed to find out that depending on how the discounts are use (as coupon or not), the result is absolutely different in ‘Amount Saved’. Moreover, some combinations of discount rules lead to the fact that the discount does not apply to the price of the goods, but to the … value of another percentage discount.
As a result, I simplified the rules to two, and still this error is observed. I created these rules again from scratch in version 2.3.0, but the error remains.
And one more important observation: an error occurs if the rule contains categories, the goods from which are not in the Cart. I also emphasize that this additional categories are created by Polylang, and are translations of the used category into other languages (perhaps this is important).
Also it was possible to understand that the error appears when two next conditions are fulfilled simultaneously:
1) one of the rules should be displayed as a coupon, but the second is not;
2) in the rule should be indicated such categories, the products from which are no in the Cart.
As I understand it, your calculator lives its own full life. )))
I specifically disabled all other plugins that use discounts, as well as all coupons and reset the discounts for Paid Memberships Pro roles, but the error persists.
I will send you copies of these two rules, it really looks funny and demoralizing. Is it possible to be sure that in other cases, with a combination of rules and conditions (the numbers of which is infinite), the plugin will display the correct sum of discount?
To make it clearer, I will lay out screenshots.
In the example, only two rules are used that give percentage discounts on the product category.
The rule which gives a 10% discount on every third product from the desired category, applies first.
After that, the second rule applies, a 20% discount on all products in this category if the user has the appropriate role.
In all four examples, I did not change anything except the settings for how the rules work – in the form of coupons or not. And the results in all cases are different.
It is especially funny to see a discount of more than 40% of the cost of the Basket, taking into account the fact that even the total application of the included rules to all products cannot give a discount of more than 30%.
As I understand it, it’s better to turn off the display of the discount size for now. This greatly detracts from the capabilities of the plugin, but it will help to avoid claims from buyers, including litigation.
And I no longer have time to delve into these problems, but in my opinion in the earlier versions of your plugin also not all right with it.
I hope you find the reason and fix it.
PS: If something was not formulated correctly, forgive me for my English.
Yours faithfully,
Farid Taziev.