Reverse Cross-Sells (WooCommerce)

When you run get_post_meta( get_the_ID(), ‘_crosssell_ids’,true); you get an array of all the products that the current product cross sells to.

How do I reverse that? To get all the products that cross sells to the current item?


Not this: Product 1 -> Cross-sell: Product 2, Product 3

But this: Product 3

Read more here:: Reverse Cross-Sells (WooCommerce)

Leave a Reply

Your email address will not be published. Required fields are marked *