Wordpress 在商业上转换价格
我的产品价格是以美元为基础的,但我想在商店和结帐时将美元转换为IRR,转换率为1美元=3500 IRR。我找到了这段代码,但它只适用于product Vew,当我点击购物车或结账时,价格会更改为美元Wordpress 在商业上转换价格,wordpress,woocommerce,Wordpress,Woocommerce,我的产品价格是以美元为基础的,但我想在商店和结帐时将美元转换为IRR,转换率为1美元=3500 IRR。我找到了这段代码,但它只适用于product Vew,当我点击购物车或结账时,价格会更改为美元 add_filter( 'woocommerce_get_price_html', 'wpa83367_price_html', 100, 2 ); function wpa83367_price_html( $price, $product ){ $price = get_post_met
add_filter( 'woocommerce_get_price_html', 'wpa83367_price_html', 100, 2 );
function wpa83367_price_html( $price, $product ){
$price = get_post_meta( get_the_ID(), '_regular_price', true);
$toman = 3500;
$total = $price * $toman . ' ' . 'تومان';
return $total;
}
这是什么货币?@Reigel伊朗货币