• Resolved theodotcom

    (@theodotcom)


    Hi

    I’m using the latest version of this plugin with checkoutwc, i have the apple pay/google pay buttons on the product page. when i click different variations it adds these variations to the cart before i’ve added it to the cart.

    I spoke to checkoutwc and they advised the fix needs to come from you:

    The extra sizes are not coming from the Add to bag button. They are being added by the Apple Pay and Google Pay buttons that Payment Plugins for Stripe puts on your product pages. Every time a size is clicked, the page sends that variation to Payment Plugins’ express checkout handler, which puts the item into your real cart so it can price the wallet buttons, and never takes it back out.

    That also explains the side cart. Once a size is already in the bag, pressing Add to bag on a size with low stock runs into WooCommerce’s stock limit – I got “You cannot add that amount to the bag – we have 1 in stock and you already have 1 in your bag”. Any failed add to cart reloads the page to show that message, so the side cart never gets the chance to open. The side cart itself is fine and will open as normal again once the extra items stop.

    I’ve had to remove the apple/google pay buttons from the product page and it works fine again.

    how can this be resovled.

    thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Clayton R

    (@mrclayton)

    Hi @theodotcom

    Thank you for contacting Payment Plugins. There seems to be some confusion by CheckoutWC on how our plugin works on the product page.

    and never takes it back out.

    The Stripe plugin does add the item to the cart so that the correct totals for the variation can be calculated. However, the item is subsequently removed from the cart in the same request. This can be verified by looking at the plugin code: https://plugins.trac.wordpress.org/browser/woo-stripe-payment/tags/4.0.14/src/Rest/Routes/V1/CartCalculation.php#L119

    If the item is not being removed during the cart calculation, that points to a conflict somewhere with 3rd party code or custom code.

    Can you share a product page link where this behavior can be observed?

    Kind Regards

    Plugin Author Clayton R

    (@mrclayton)

    Hi @theodotcom

    Following up on this request.

    Thanks

    Thread Starter theodotcom

    (@theodotcom)

    Hi

    I turned the buttons off the product page to stop the issue. however i can set it up on a staging site for you to see. do you have an email i can send you the link, as you will need to log in to see the front end.

    thanks

    Plugin Author Clayton R

    (@mrclayton)

    Hi @theodotcom

    It’s against forum rules to share email details. You can create a support ticket via the support widget located in the plugin settings pages.

    Kind Regards

    Plugin Author Clayton R

    (@mrclayton)

    Hi @theodotcom

    We had a report of a similar issue and it looks like some 3rd party plugins persist the cart data to the database outside of the WooCommerce core filters. To account for that scenario we’re going to add some additional code in the next release that ensures the cart calculation is not orphaned.

    https://wordpress.org/support/topic/quantity-doubles-on-cart-page/

    That should resolve your issue.

    Kind Regards

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.