【发布时间】:2019-11-27 17:13:33
【问题描述】:
我正在为 WooCommerce 使用多币种插件。价格现在转换为 MKD 第纳尔。现在我想在 (MKD) 价格之前显示正常价格 (USD)。
这是我在 Function.php 中的代码
add_filter( 'woocommerce_get_price_html', 'cw_change_product_price_display' );
add_filter( 'woocommerce_cart_item_price', 'cw_change_product_price_display' );
function cw_change_product_price_display( $price ) {
$text = 'echo $product->get_regular_price;';
// returning the text before the price
return $text . ' ' . $price;
}
有人可以帮我使用正确的语法吗?
【问题讨论】:
标签: php wordpress woocommerce