• Resolved musicmschell

    (@musicmschell)


    I am experiencing a bug on our staging site where additional products are added to the order AFTER checkout. It appears to happen when there are 2 or more products on the order. WordPress is up-to-date and I checked for a plugin conflict by deactivating all plugins except WooCommerce and changing to the Storefront theme for testing. Unfortunately, I’m still having the same issue. I clicked through most of the tools in the WooCommerce > Status tab to do things like verify the database and clear transients but the issue is still present. I also reached out to my host (WP Engine) to see if they were modifying WooCommerce at all and they confirmed that nothing they are doing is causing this. The functions.php file does not have anything on it that would cause this either. This is happening on every browser I’ve tested so far (Chrome, Safari, Firefox).

    You can test this using coupon code “zgm100” at checkout for 100% off and free shipping. Any help would be greatly appreciated!!!

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hey there @musicmschell I can confirm I had an additional product after I checked out, but I did have the two items I chose.

    My cart before checkout

    My products after

    Ensure you’re not using a gift app or something where if they meet a certain threshold a free item is added after. Only thing I can think of off the top of my head right now.

    Thread Starter musicmschell

    (@musicmschell)

    Thanks for taking a look! Yes, that is exactly the issue I’m experiencing too. I can confirm that I don’t have a gift app or any other plugin running that would do this. In fact, just WooCommerce and the WooCommerce updater plugin are the only two plugins active.

    Thanks for confirming @musicmschell Any custom code in the theme?

    Thread Starter musicmschell

    (@musicmschell)

    None! I switched to a new Storefront install for testing purposes so I can confirm there is no custom code.

    @musicmschell Can you go to WooCommerce > Status > Tools and then scroll down a bit. Click Update Database please

    After about 10 minutes go into WPE and clear all cache from server. Give the db time to update a little. Do not clear server cache from backend of WP dash for WPE. Not the same.

    Thread Starter musicmschell

    (@musicmschell)

    I updated the database, waited about 15 mintues, then cleared the cache in WP Engine. I waited another 10-15 and put another order through in an incognito window. Unfortunately, the error still occurred.

    Hey there, @musicmschell! Thanks for contacting us. I’m happy to help you.

    Thank you for all the information and testing.

    This is indeed a unusual issue.

    I was able to replicate it even with only one product on the cart.

    Since you have run several test orders, have you noticed if it is always the same product that is added?

    Is this happening on every order?

    Have you tried a test order without a coupon? If so, does the issue happens too?

    I’d also like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:

    System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support.
    Fatal error logs (if any) under WooCommerce > Status > Logs. Then you can use the selector to search for Fatal Errors.
    You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter musicmschell

    (@musicmschell)

    This error does not occur on every order and will occur even without a coupon. It doesn’t matter what product is in the cart from what I can tell and there isn’t a correlation between what is in the cart versus what gets added after the fact. Here is a link to my status report.

    https://gist.github.com/mschell1914/6210be3e31bbcb6165402f96eeac7339

    I really appreciate your help looking into this! It certainly is a weird one!

    Stef

    (@serafinnyc)

    @musicmschell Wow, why are there so many different tables and prefixes? Was this a multi-site at some point?

    You mentioned to me that nothing but WooCommerce was installed on here initially, but this has so many things going on. Wowza

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hi @musicmschell,

    I just tried this as well with a single item: Kirby Pet Owners Carpet Shampoo, and I got the same results: the MicroAllergen Plus HEPA Filter Bags – 6 pack was added to my purchase. It’s interesting to note this modifies the subtotal of the cart, but not the total.

    I’m curious: Is this the same product added all the time, or do different products get added? If this is the only one, have you tried temporarily trashing this item or re-creating it from scratch? Maybe even simply marking it out of stock?

    When did you notice this issue started happening? Were any changes made around that time? Like updating or installing a plugin, changing any settings on your site, modifying your database in any way, etc.

    I found a very similar issue on GitHub that points to a database error that is worth looking into. A solution is posted in this comment (and other comments after this one): https://github.com/woocommerce/woocommerce/issues/21239#issuecomment-419468762.

    <span style=”box-sizing: border-box; margin: 0px; padding: 0px;”>If you’re not familiar with database manage</span>ment, it’s advised that you ask your hosting support for help with this or hire a professional. Please also consider backing up before making any database changes, especially on your live site.

    Thanks!
    -OP

    Thread Starter musicmschell

    (@musicmschell)

    @serafinnyc Yes, I know for sure that this website was a multi-site at one point then transitioned back. I’m not a database guy so I really do not know how to clean something like this up but I will investigate as I think it’s probably a reason the site has been moving slowly.

    @omarfpg Thank you for this! I will investigate with my host to see if the order_IDs are messed up. This is a staging site which was migrated from production using WP Engine’s tools and the migration may have caused the ID’s to get out of sync.

    Stef

    (@serafinnyc)

    Hey @musicmschell thanks for the response. So that database in my opinion looks like the cause here. I’d look at the config file now and see if by chance one of those other sites is still connected and is adding the additional product somehow. This is one of those weird instances.

    Hey, @musicmschell!

    I’m not a database guy so I really do not know how to clean something like this up but I will investigate as I think it’s probably a reason the site has been moving slowly.

    If you need tips on cleaning up and optimizing your database, we have a great blog post that might help you. You can check it here.

     I will investigate with my host to see if the order_IDs are messed up. This is a staging site which was migrated from production using WP Engine’s tools and the migration may have caused the ID’s to get out of sync.

    All right, please let us know how it goes.

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter musicmschell

    (@musicmschell)

    @omarfpg SOLVED! I reached out to WP Engine and shared that link with them. You were correct, the IDs on order_items table was out of sync. I worked with my host who was able to help me resolve the issue. Note, they were hesitant to do this type of database work but agreed to attempt it since it was a staging site. Thankfully, this resolved my problem.

    Thank you to everyone for their assistance. This was a tricky one!

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hey @musicmschell!

    Thank you so much for sharing the good news! 🙂 This was a really interesting one indeed, and I’m glad we were able to help! If you have a few minutes, we’d love if you could leave us a review: https://wordpress.org/support/plugin/woocommerce/reviews/.

    Cheers!
    -OP

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Different products added after checkout’ is closed to new replies.