post->ID; ?>
get_type() == 'external' ) ? ' target="_blank" rel="nofollow"' : '' ;
$product_link = ( $_product->get_type() == 'external' ) ? $_product->add_to_cart_url() : get_the_permalink($post_id);
$offer_coupon_date = get_post_meta( $post_id, 'rehub_woo_coupon_date', true );
?>
1){
$stock_sold = $stock_sold + ($index * 3);
$stock_available = $stock_available + ($index * 5);
}
} else {
$stock_sold = ( $total_sales = get_post_meta( $post_id, 'total_sales', true ) ) ? round( $total_sales ) : 0;
$stock_available = ( $stock = get_post_meta( $post_id, '_stock', true ) ) ? round( $stock ) : 0;
}
$percentage = ( $stock_available > 0 ) ? round( $stock_sold / $stock_available * 100 ) : '';
?>
modify( '+'.$index.' day' );
$month = $now->format( 'm' );
$year = $now->format( 'Y' );
$day = $now->format( 'd' );
$hour = $now->format( 'H' );
$minute = $now->format( 'i' );
?>
$year, 'month'=>$month, 'day'=>$day, 'minute'=>$minute, 'hour'=>$hour));?>
%s',
esc_url( $_product->add_to_cart_url() ),
esc_attr( $_product->get_id() ),
esc_attr( $_product->get_sku() ),
$_product->supports( 'ajax_add_to_cart' ) ? 'ajax_add_to_cart' : '',
esc_attr( $_product->get_type() ),
$_product->get_type() =='external' ? ' target="_blank"' : '',
$_product->get_type() =='external' ? ' rel="nofollow"' : '',
esc_html( $_product->add_to_cart_text() )
),
$_product );
?>