<?php foreach ( $upsells as $upsell ) : ?>
<?php
$post_object = get_post( $upsell->get_id() );
setup_postdata( $GLOBALS['post'] =& $post_object );
?>
<?php endforeach; ?>
<?php woocommerce_product_loop_end(); ?>
This yields
ERROR Overriding WordPress globals is prohibited on line setup_postdata( $GLOBALS['post'] =& $post_object );
I am working on a theme for thmeforest.net