<?php
/**
 * @package WordPress
 * @subpackage Campoal
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( $upsells ) : ?>
	<div class="ui hidden section divider"></div>
	<div class="ui vertical basic segment">
		<h2 class="ui header"><?php esc_html_e( 'You may also like&hellip;', 'campoal' ) ?></h2>
        <div class="title-divider"></div>
    </div>

	<section class="up-sells upsells products">

		<?php woocommerce_product_loop_start(); ?>

			<?php foreach ( $upsells as $upsell ) : ?>

				<?php
					$post_object = get_post( $upsell->get_id() );

					setup_postdata( $GLOBALS['post'] =& $post_object );

					wc_get_template_part( 'content', 'product' ); ?>

			<?php endforeach; ?>

		<?php woocommerce_product_loop_end(); ?>

	</section>

<?php endif;

wp_reset_postdata();
