• Hi woocommerce team,

    On one of my sites where HPOS was active, there were several problems that I will mention below.

    1- When HPOS is enabled, orders are also stored in wp-posts table.

    2- I placed a few test orders, then deleted the orders completely, but I still get identified as a verified buyer of the product.

    3- I place an order, but I am not identified as the buyer of the product.

    In general, there are several problems with the order database. I would be happy if you would take a look at my site. This is just for testing and checking the problem and is not a support request. If this is possible please just tell me where to send the access data.

    thank you

Viewing 9 replies - 1 through 9 (of 9 total)
  • Zee

    (@doublezed2)

    Hello hoseinkh,

    Thank you for contacting WooCommerce support.

    I understand that you are experiencing issues with HPOS, where orders are still stored in wp-posts, deleted orders still mark you as a verified buyer, and some orders do not recognize you as the buyer.

    Please share your System Status Report by pasting it into https://pastebin.com and providing the link here. Also, share a screenshot of the HPOS settings page.

    Additionally, share screenshots showing how you are identified as a verified buyer and how you are not. I want to understand how this mechanism works.

    Please do not offer or share any login details, as that is against our support policy.

    Looking forward to your response. 🙂

    • This reply was modified 9 months, 1 week ago by Zee.
    Thread Starter Hossein Khadem Abolfazl

    (@hoseinkh)

    Hi @doublezed2,

    Thank you for your attention to this report.

    Status: https://pastebin.com/MiZbvAik

    HPOS settings: https://prnt.sc/S7dDFny3Udib

    After filing this report, I reset the site (this is a test site) and re-ran WooCommerce with sample products and tried to reproduce the issue again. I finally managed to get to that problem again and it seems that this option causes the orders database to completely crash.

    When I clicked on this option, it showed 6 orders waiting to be synced. While there was only one order in the order list and I had already deleted the other orders. I don’t know, maybe the problem is that after deleting an order, WooCommerce still keeps the order information in the database…

    As I mentioned earlier, now if a user places an order, they will not be recognized as a buyer. Because if they post a comment, they will not be displayed as a verified buyer. Also, using the wc_customer_bought_product function, the “You have already purchased this product” badge no longer works.

    If I delete all orders, orders that were placed before this bug still show the “You have already purchased this product” badge. even Their review is also titled “verified owner”.

    I initially thought it was a problem with the template. I raised the issue with the support and this is their response:

    On your website, I suspect the Woo order table has some issues.

    I switched to WP default theme, created snippet just to see what is the result when using wc_customer_bought_product function. https://prnt.sc/bwTN9pY-R6RR

    Additionally, if I leave a review on the product page, it should have (verified) text. But your website not showing that.

    End

    While apologizing for the length of this report, I had a few questions regarding HPOS.

    1- It seems that when we enable HPOS, some data is still being stored in wp-posts. Is this normal?

    2- Let’s say there are 5000 orders on our site before enabling HPOS. When we enable HPOS, these orders are moved to new tables. But are they still present in the old (legacy) tables? From what I’ve seen and researched, they seem to still be present in the legacy tables. But wouldn’t it make sense to automatically remove them, given that they exist in the new tables as well?

    3- Does deleting an order completely clear the order information from the database? I deleted a few orders, but I can still see information about them in various tables. For example: https://prnt.sc/T_eFq12QAGRu

    4- Now that the orders database seems to be completely corrupted (even though my site is a test site), is there a way to fix this? So that everything goes back to normal and the remaining data in the database is cleared?

    I hope a major website with so many orders doesn’t face this challenge.

    I apologize again for the length of this report. I hope the information I shared is useful and helps to resolve it.

    Thank you

    Plugin Support Moses M. (woo-hc)

    (@mosesmedh)

    Hi @hoseinkh,

    Your explanation is unclear, and more details are needed to understand what you’re referring to.

    Could you provide more context and screenshots of the “Verified buyer” and the comment about users not being recognized as buyers when they post a comment?

    To start fixing the issue, enable “compatibility mode” and click “Save settings.” This will sync the products automatically, so you don’t need to manually click “sync products.”

    Regarding HPOS, it’s normal for some data to still be stored in the wp_posts table, even with HPOS enabled. While HPOS moves most order data to custom tables for better performance, order-related data like notes, product details, and metadata may still be stored in wp_posts because orders are still treated as a type of WordPress post.

    When you delete an order, some data, such as metadata and notes, may still remain in tables like wp_postmeta, wp_comments, and wp_woocommerce_order_items. This is expected behavior.

    To repair the database, add define('WP_ALLOW_REPAIR', true); to your wp-config.php file, then visit http://www.example.com/wp-admin/maint/repair.php (replace with your domain). You can also use plugins like WP-Optimize to clean the database or go to WooCommerce > Status > Tools to clear transients, regenerate product tables, and verify the database. This should help fix any broken tables.

    Thread Starter Hossein Khadem Abolfazl

    (@hoseinkh)

    Hi @mosesmedh,

    Please watch the video below. I hope it is clear. At the beginning of the video, you see that there are no orders on the website, but the user’s comment has the verified owner label. This user (Which is a test account) has previously had orders that have been deleted, but they are still recognized as a verified user.

    Also, in the video below, you can see that I purchase the Beanie with Logo product, but after publishing the comment, the verified owner label is not displayed.

    https://drive.google.com/file/d/1oFN6sCdK1KBEGFwnxOVt8HVQfiZstc6r/view?usp=sharing

    I also tried repairing the database, but the problem was not resolved.

    Thank you

    Plugin Support Moses M. (woo-hc)

    (@mosesmedh)

    Hi @hoseinkh,

    Now I see what you’re referring to. There’s nothing wrong with your database—what you’re seeing is actually expected behavior. Let me explain.

    Say you have a customer named John. If John places an order that gets marked as Completed and then leaves a review, his review will display the Verified badge.

    If you later delete John’s order, it doesn’t change the fact that he was a verified customer since he had a completed purchase.

    Now, if John places another order that is On Hold, Pending, or Processing, and he leaves a review before the order is completed, the Verified badge won’t appear because the purchase is still in progress.

    However, once the order is marked as Completed, any new review John leaves will show the Verified badge. But his earlier review (before the order was completed) will not retroactively gain the badge.

    In your case, the order you’re referring to is still in Processing status. Try marking it as Completed and then leaving a new review—you’ll see the Verified badge appear.

    To answer one last question, Once a review has been marked as verified, even if the user leaves review on another product that is isn’t completed it won’t show verified and that has nothing to do with their previous review that shows verified since they are two different products.

    Thread Starter Hossein Khadem Abolfazl

    (@hoseinkh)

    Hi again @mosesmedh,

    Sorry for the delay in replying. Honestly, I couldn’t find the exact cause of the problem. But I was able to fix it to a large extent. But there is still a problem that I hope there is a solution for.

    How is it possible that there are no orders, but in the analytics section, there are one or more orders?

    While total_sales in that product displays the value 0. https://prnt.sc/ybGhHU2u_bde

    This is also seen on another website. So where is this data stored and how can we delete it?

    Or for example, on another website, there are no orders (I’ve deleted all of them) but there are a number of products listed as sold in analytics. https://prnt.sc/3y4owVNeiEDS

    This can’t be normal behavior because to test this I purchased a product and deleted it, after which it was also deleted from analytics. But I really don’t know how these remained…

    Thank you

    Plugin Support Moses M. (woo-hc)

    (@mosesmedh)

    Hi @hoseinkh,

    I’m not sure if you saw my last response, but as I mentioned, the review issue you’re referring to is not actually a problem—it’s the expected behavior. If you’d like it to function differently, you can customize it using plugins or custom code.

    Regarding deleted orders, WooCommerce doesn’t always remove them from analytics right away since the data is stored separately for performance reasons.

    To resolve this, go to WooCommerce > Status > Tools, then:

    • Clear WooCommerce transients and Expired transients
    • Scroll down and clear the Analytics cache
    Thread Starter Hossein Khadem Abolfazl

    (@hoseinkh)

    Thank you @mosesmedh,

    Everything is working fine now.

    Hi @hoseinkh,

    Thanks for the update! I’m glad everything is working fine now. I’ll go ahead and mark this thread as resolved, but feel free to reach out if you need any further assistance. Happy selling!

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

The topic ‘Multiple problems in HPOS’ is closed to new replies.