2015-04-02 24 views

回答

0

得到这个工作 下面的代码添加到您的invoice.php -

$item['product']->regular_price 
0

要添加正常价格,以发票为每个产品,只需将下面的代码添加到您的invoice.php文件,右键位于SKU的标签下方dl

在我的示例中,我将其标记为“单价”。随意改变,如果你想。

<dl class="meta"> 
     <?php $description_label = __('Unit Price', 'wpo_wcpdf'); // registering alternate label translation ?> 
     <?php if(!empty($item['product']->regular_price)) : ?><dt class="sku"><?php _e('Unit Price:', 'wpo_wcpdf'); ?></dt><dd class="sku"><?php echo $item['product']->regular_price; ?></dd><?php endif; ?> 
    </dl>