0
我已经重写了woo-commerce customer-completed-order.php模板在WordPress的子主题中。尽管如果订单已创建,则不会发送电子邮件。覆盖customer-completed-order.php不起作用
<?php
if (! defined('ABSPATH')) {
exit;
}
$order = wc_get_order($order_id); // optional (to test without it)
foreach ($order->get_items() as $item_id => $item) {
$product_name = $item['name']; // product name
}
/**
* @hooked WC_Emails::email_header() Output the email header
*/
do_action('woocommerce_email_header', $email_heading, $email); ?>
<p><?php printf(__("Hi there. Your recent order on %s has been completed.", 'woocommerce'), $product_name); ?></p>
<?php
如何解决?
你到目前为止检查了什么问题? – Reigel