Discount Stacking on Mini-Cart
-
I am troubleshooting an issue with the mini-cart (preview cart). I’m using WooCommerce, WooCommerce Bookings, and WooCommerce Memberships. The issue I’m having is that when a user with 2 memberships on their account, logs in, they add a product to their cart, the mini-cart will display a double discount (so if it’s 10%, the subtotal will add an additional 10% discount on top).
https://snipboard.io/JZx5Hu.jpg
I have contacted the support for WooCommerce Bookings and Memberships and they directed me to contact OceanWP as it seems the mini-cart originates from the theme.
Additional troubleshooting notes:
I have custom code to disable discount stacking for WooCommerce Membership in my function file, which applies on the product page, but does not affect the mini-cart.
I’ve updated all my plugins and the theme to the latest version.
BouncingSprout Support Notes:
Our plugin allows users to add additional bookings from the booking screen. It creates proposed bookings based on the initial booking, using the standard WooCommerce Booking functions. It determines the correct pricing for each of these 'recurring bookings' based on pricing rules. We then hook into woocommerce_add_cart_item, with a simple foreach loop, where the '_cost' of each booking is added up to get $price, and then we return $cart_item['data']->set_price( $price ); This has always worked well - and indeed still does with WooCommerce Memberships in the actual cart, where your discounts are preserved. For reasons I don't understand, the mini-cart, if activated, seems to double-discount. E.G.. Customer makes two bookings (£10 per booking). Memberships offers a 50% discount. The main cart correctly gives a subtotal of £10 (£20 - 50%), but the mini-cart shows £7.50. Interestingly, if you then go to the cart, simply clicking once on the mini-cart (or refreshing the page) makes it display the correct price (£10). Because the cart functionality seems to be working, I'm veering towards the issue being more to do with how the mini-cart displays the price, rather than an issue deep in the logic our plugins.
SkyVerge Support Notes:
Having stepped through this from our end of things, my assessment is the same—I'm thinking this is likely due to the Mini Cart itself. It looks like this mini-cart is implemented through your theme, OceanWP. I looked at the OceanWP Changelog and it looks like they modified the mini-cart in their latest version, 3.2.2: https://docs.oceanwp.org/article/653-oceanwp-theme-changelog Would you please try updating the theme to version 3.2.2 and let me know if it resolves this issue that you're seeing? Of course, I'd recommend making a full backup of your site before making any changes in case something unexpected happens. :)
Updated to the latest version of the theme and problem remains.
The page I need help with: [log in to see the link]
- The topic ‘Discount Stacking on Mini-Cart’ is closed to new replies.