Now I’ve taken one last test to make sure it was not my mistake.
1 – I downloaded wordpress 4.9.7.
2 – Downloaded the theme – https://underscores.me/ (Select the advanced options before downloading. And then enable the WooCommerce boilerplate option.)
3 – I created a database in WAMP
4 – I performed the installation
4.1 – Activated the theme
5 – I inserted the 3 plugins: woocommerce, price rules, Ajax cart.
6 – I activated woocommerce, I ran the default configuration and imported the products from the CSV file that woocommerce offers.
7 – I activated the price rules plugin. I created a 25% discount price rule for all products. In the settings you have activated the following options:
– Show Price discount on product page
– Show Sale tag on product page
– Force refresh the cart widget while add and remove item to cart
?The rest left the pattern.
8 – Activated the AJAX plugin cart. In the ajax cart settings I have enabled the following option: Add to cart without page refresh.
9 – In wordpress settings, in permanent links. I activated it by the name of the post.
10 – Go to the store page and buy the first product. The side car will open and everything will be correct.
11 – Open the product page that was purchased. Now, inside the single product page, buy the same product again. We will see that the error happens. The discount was applied 2x.
12 – Another way to simulate the error is Do not enable option: Force refresh the cart widget while add and remove item to cart. So the problem occurs in the product listing, without having to enter the page of a specific product. Just buy the same 2x product that the error happens.
13 – The error only happens when a product is bought repeated. If you buy several products, however only 1 of each problem does not happen.
I hope it has become clear. I am willing to help in whatever I can. Thanks for listening.