strangerstudios / pmpro-woocommerce

Connect Paid Memberships Pro with WooCommerce and WooCommerce Subscriptions to sell membership products and offer members-only product discounts.
https://www.paidmembershipspro.com/add-ons/pmpro-woocommerce/
46 stars 32 forks source link

WooCommerce store discount applied twice #169

Closed michaelbeil closed 1 year ago

michaelbeil commented 2 years ago

Describe the bug When you click on details for the Visits, Views, and Logins Report, the visit numbers are off.

To Reproduce Steps to reproduce the behavior on customer site:

Requires Premium version of YITH Product Add-Ons & Extra Options.

  1. Go to YITH Product Add-Ons & Extra Options” in the admin dashboard.
  2. Click the “Edit” button next to the “20 Page Special Edition Tan (No Sepia & No Black)” block.
  3. Scroll down to the “Options” section at the bottom and click the “Choose Your Paper – Radio (5 options)” link.
  4. Click the Advanced Settings tab at the top.
  5. Toggle the “Sell options individually” option from Yes to No. If that toggle is set to No then the problem occurs; if it’s set to Yes then the bug does not occur.

Screenshots

image

Expected behavior The discount shouldn’t be applied twice.

Isolating the problem:

This came up in ticket 439072, download Premium plugin (Edit: Moved download link to P2). Customer:

I could reproduce the error. I verified that it is indeed that YITH setting that is causing the problem. I disabled all plugins but PMP, Woocommerce and YITH; and I even changed the theme to wordpress 2022. If I activate the setting it works…if I deactivate it, it breaks. Same as before. I have put a ticket into YITH.

YITH support told the customer to contact us.

Since the discount is applied by the other plugin it should be better for them to manage this problem so we don’t modify their plugin. I’ve been checking and I couldn’t find a solution for the problem.” WordPress Environment

``` Paid Memberships Pro 2.9.1, WooCommerce 6.7.0, YITH WooCommerce Product Add-ons & Extra Options Premium 3.4.1, WordPress 6.0.1, and PHP 7.4.1 ```
andrewlimaza commented 1 year ago

Unable to replicate, I've reached back out to the customer. For issues like this, please can you also provide frontend screenshots of the error as it may take time before we attend to these issues.