我使用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