【发布时间】:2018-10-20 00:40:56
【问题描述】:
在 Woocommerce 中,我使用了一个名为 YITH WooCommerce PDF Invoice and Shipping List 的插件,我想在 PDF 发票中添加客户备注。
我想在下面代码的第一个 span 行之后添加它:
<span class="notes-title"><?php _e( "Notes", "yith-woocommerce-pdf-invoice" ); ?></span>
<div class="notes">
<span><?php echo nl2br( $notes ); ?></span>
<?php do_action( 'yith_ywpi_after_document_notes', $document );?>
</div>
</div>
<?php
但我不知道如何从$document 变量中获取客户备注。
我曾尝试使用这个答案线程:“Display Customer order comments (customer note) in Woocommerce”,它看起来很像同样的问题,但仍然无法弄清楚,因为$document->order->customer_message; 不起作用。
感谢任何帮助。
【问题讨论】:
标签: php wordpress pdf woocommerce invoice