我使用WooCommerce,我需要从我woocommerce数据库中提取数据:获取来自数据库的具体数据产品
我知道,我可以得到一个项目的正常价格与此代码:
$regPrice = $_product->get_regular_price();
在数据库与正价场看起来是这样的:_regular_price
我知道折扣看起来像这样在数据库:_bulkdiscount_discount_1
所以我想,我可以得到这样的折扣1:
$discount1 = $_product->get_bulkdiscount_discount_1();
但不幸的是,这是行不通的。当我尝试使用这个代码echo "<p>Discount One = $discount1 </p>";
来回显$ discount1时,什么都不会“回显”。
我做错了什么?
这里有没有任何Woocommerce Cracks谁能告诉我正确的方向?
感谢
太好了 - 非常感谢!作品非常完美! – Bosstone