function fiyatguncelle()
{
var fiyat="";
var fiyatalan=$(".woocommerce-variation-price .wcpbc-price .woocommerce-Price-amount").html();
if($(".woocommerce-variation-price .wcpbc-price .woocommerce-Price-amount").length)
{
fiyat=$(".woocommerce-variation-price .wcpbc-price .woocommerce-Price-amount").html().split(";")[1].replace(",",".");
}else{
fiyat=resimattr.fiyat;
}
var width=$("#width").val();
var height=$("#height").val();
var mt=$("input[name='quantity']" ).val();
$("#mt").html("="+mt+" m²");
var kagitFiyatSon=$("#kagit_tipi").val();
$("#tfiyat").html((parseFloat(mt)*fiyat+Number(kagitFiyatSon)).toFixed(2) +"₺");
}burada çıkan çıktıyı yani tfiyat'ı nasıl php de bir fonskiyon içinde gösterebilirim?göstermek istediğim fonksiyon
function return_custom_price($price, $product) {
global $post, $blog_id;
$price = get_post_meta($post->ID, '_regular_price');
$post_id = $post->ID;
$price = ($price[0]+"ÇIKTIYI GÖSTERECEĞİM ALAN");
return $price;
}
add_filter('woocommerce_get_price', 'return_custom_price', 10, 2);