<?php
/**
 * Loop Price
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/loop/price.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see 	    https://docs.woocommerce.com/document/template-structure/
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     1.6.4
 */

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

global $product;
?>
<?php
$catID = wp_get_post_terms($product->get_id() , 'product_cat');
$none_price = get_option('none_price_cat');
$exist_cat = false;
if(is_array($none_price)){
foreach($catID as $single_cat){
	if(in_array($single_cat->term_id , $none_price)){$exist_cat = true; break;}
 }
}
if(!$exist_cat){
?>
<?php if ( $price_html = $product->get_regular_price() ): ?>
	<span class="price"><?php echo number_format($price_html) . ' ' . get_woocommerce_currency_symbol(); ?></span>
<?php else:
if (get_theme_mod( 'charsoogh_zero_price' )) : echo '<span class="price"><span class="woocommerce-Price-amount amount"><span>' . get_theme_mod( 'charsoogh_zero_price') . '</span></span></span>'; else: echo '<span class="price"><span>'. __('Call for more Information', 'charsoogh') .'</span></span>'; endif;
endif;
}
?>
