I’m creating a page that is shown when a user add a product in the Cart. Once a user click on “Add to Cart” button, this template is shown.
The goal is to show other products that other customers have bought based on the item added.
It’s the same functionality than Amazon.
I know how to make queries in WooCommerce but do not know how to get other products contained in other orders that contain the product selected.
Anyone can help me?
Finally I created my own template to show products bought bu other users related to the item added to cart:
?>
There is currently no plugin providing this feature as such. But the following link might help you to achieve the purpose you are intending to.
https://github.com/bhaveshbhide/woocommerce-cross-selling/
This is the only useful link i found which has an answer to your question.
Do let me know if this works for you.