3
我试了很长时间才从php文件上的特定产品获得价格,但我找不到解决方案。我试过用woocommerce简码,但我总是得到完整的产品在我的div而不是价格。在php页面上获取woocommerce产品价格
有没有人知道解决方案?
非常感谢!
<div class="package-header">
<span class="packe-title bronze-title">Bronze</span>
</div>
<div class="price-container">
<?php $price=get_post_meta(get_the_ID(), '_regular_price'); echo $price; ?>
</div>
非常感谢! – Johnny97