One of the fantastic features of Oxygen is Conditions and the most powerful and versatile of them is the Dynamic Data condition.

This members-only tutorial shows how we can create a custom function that returns a count of the number of linked upsell products for a WooCommerce product and use this via the Dynamic Data condition to have an element be output only if there is at least 1 upsell (or conversely if there is no upsells if that is what you want) on single product pages.

Note: This is where/how we can specify upsells for products:

Step 1

Install and activate Code Snippets plugin.

Go to Snippets > Add New.

Title: [WooCommerce] Get the number of upsells


This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $399 one-time).

Already a member? Log in below or here.

Need help implementing a tutorial in your site or want to hire me for custom work?


Find the article helpful and wish to donate?



You need to be logged in to view and post comments.
Not a member yet? Join here.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: