<?php
/**
 * Single Product title
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     1.6.4
 */

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

if ( ! yit_get_option('shop-products-details-nav') ) return;


$excluted_terms = '';
$in_category = false;

if( yit_get_option( 'shop-nav-in-category' ) ) {
    $in_category = true;
}

$prev_product = wc_get_product( get_previous_post( $in_category, $excluted_terms, 'product_cat' ) );
$next_product = wc_get_product( get_next_post( $in_category, $excluted_terms, 'product_cat' ) );

$prev_post_content = ( $prev_product != '' ) ?  __( 'Prev', 'yit' ) : '';
$next_post_content = ( $next_product != '' ) ?   __( 'Next', 'yit' ) : '';

$prev = get_previous_post_link( '<div class="prev">%link</div>', $prev_post_content, $in_category, $excluted_terms, 'product_cat' );
$next = get_next_post_link( '<div class="next">%link</div>', $next_post_content , $in_category, $excluted_terms, 'product_cat' );

?>
<div class="product-nav">
    <?php echo $prev ?>&nbsp;&nbsp;/&nbsp;
    <?php echo $next; ?>
</div>