Install and activate Code Snippets plugin.
Add below code in code snippets:
function wpl_check_upsell_product(){
$upsell_product = wc_get_product( get_the_ID() );
$count = count( $upsell_product->get_upsell_ids() );
return $count;
}
Edit the Oxygen Template that applies to woo single products.
For the element you want to apply the “minimum 1 upsell” condition, click on Conditions icon then Set Conditions.
Click “Add Condition” icon.
Choose Dynamic Data condition.
Under Advanced click PHP Function Return value.
Function Name: wpl_check_upsell_product
Set the operator, >=
Set the value 1
.