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