小编R. *_*rma的帖子

Conditional display based on product category in processing order email template

我正在研究的代码customer-processing-order.php WooCommerce email Template.

仅当订单商品具有已定义的订购商品产品类别时,我才想显示下面的代码。

<p><?php _e( "Your order has been received and is now being processed. Your order details are shown below for your reference:", 'woocommerce' ); ?></p>
Run Code Online (Sandbox Code Playgroud)

就像是:

if($categ="demo1"){
<p><?php _e( "Your order has been received and is now being processed. Some text here:", 'woocommerce' ); ?></p>
} 
Run Code Online (Sandbox Code Playgroud)

以下是模板代码的摘录:

<?php
/**
 * Customer processing order email
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-processing-order.php.
 *
 * HOWEVER, on occasion WooCommerce will need to …
Run Code Online (Sandbox Code Playgroud)

php wordpress categories orders woocommerce

3
推荐指数
1
解决办法
1365
查看次数

标签 统计

categories ×1

orders ×1

php ×1

woocommerce ×1

wordpress ×1