Browser: Chrome 132.0.6834.160
OS: Windows
Hi bricks team,
I tried to use the Product purchased by user condition for the first time, but it doesn’t work at all. I also tried to find the reason but I didn’t succeed…
Browser: Chrome 132.0.6834.160
OS: Windows
Hi bricks team,
I tried to use the Product purchased by user condition for the first time, but it doesn’t work at all. I also tried to find the reason but I didn’t succeed…
Hi Hosein,
Thanks for your report!
Without knowing what you have tried where it is difficult to say what you want to report as a bug However, I think you have a different idea of what it does. Unfortunately, we haven’t documented this anywhere yet.
We use the wc_customer_bought_product
core function, which does the following:
“Checks if a customer has bought an item. The check can be done by email or user ID or both.”
Useful core functions - Woo Developer Docs
In other words, it checks whether you have purchased a product as a logged-in user to show you other relevant products or simply a note that you have already purchased it.
Best regards,
timmse
Hi timmse,
Yes, I know how this works. But for testing I tried to display a button or any other element in the query loop and then set this condition on it. Then I did some test purchases but it doesn’t recognize as a purchased product for the current user.
Could this be affected by HPOS in WooCommerce?
Have your orders been completed (status)?
Hi timmse,
Yes, I just made another test purchase, changed its status to completed, but it still didn’t work.
Strange, it works perfectly for me.
You already know the game: can you send us access data and a link to this thread? Thank you!
Hi timmse,
I just emailed the access data.
Hi again,
Just to update, this is a problem on the WooCommerce side and not a problem on the bricks side.