Gözünü kapatmayı anlamadım ama fiyatı gizlemek istiyorsanız ve woocommerce ise şöyle bir kod var hocam kullanabilirsiniz. Functions.php içerisine ekleyin.
Kaynak :
https://njengah.com/woocommerce-hide...n-out-of-stock /**
* Hide Price When Out of Stock
*/
add_filter( 'woocommerce_variable_sale_price_html', 'njengah_remove_prices', 10, 2 );
add_filter( 'woocommerce_variable_price_html', 'njengah_remove_prices', 10, 2 );
add_filter( 'woocommerce_get_price_html', 'njengah_remove_prices', 10, 2 );
function theanand_remove_prices( $price, $product ) {
if ( ! $product->is_in_stock()) {
$price = '';
}
return $price;
}
fontawesome kullandığınızı varsayıyorum;
<?php if($stok <= 0) {
echo '<i class="fa fa-eye-slash"></i>';
} else {
echo '<i class="fa fa-eye"></i>';
} ?>
Şöyleki Ticimax alt yapısı kullanmaktayız. Ancak stokları bitince fiyatları görünmekte.