如何显示“正常价格"而不是“折价"迷你推车上(呜呜) [英] How to show "regular price" instead of a "discounted price" on mini-cart (Woo)
本文介绍了如何显示“正常价格"而不是“折价"迷你推车上(呜呜)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我阅读过有关woocommerce的每个主题,但是找不到如何显示正常价格而不是迷你车的打折价格. (是的,我想在mini-cart.php中显示正常价格)
I have read like every single topic about woocommerce but cannot find out how to show regular price instead of a discounted price on mini-cart. (Yes, i want to show regular price in mini-cart.php)
我认为我应该修改 mini-cart.php: 41 ,但我不知道如何显示正常价格.
I think i should modify mini-cart.php:41 but i dont know how i can show regular price.
$product_price = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key );
有人可以帮我吗?
推荐答案
是的,我在 mini-cart.php:41 上使用了它,并且工作了!
Yes i used this on mini-cart.php:41 and worked!
apply_filters( 'woocommerce_get_regular_price', $_product->get_regular_price(), $cart_item, $cart_item_key );
这篇关于如何显示“正常价格"而不是“折价"迷你推车上(呜呜)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文