當前電子郵件附在此處。我想添加一行說「賣家資源轉到www.domain.com/slug」。我如何將此文本添加到此電子郵件的鏈接? (我有旁邊0 PHP的技能,但試圖學習)。將簡單文本添加到Woocommerce電子郵件
if (! defined('ABSPATH')) {
exit; // Exit if accessed directly
}
?>
<?php do_action('woocommerce_email_header', $email_heading, $email); ?>
<p><?php printf(__('Thanks for creating an account on %1$s. Your username is %2$s', 'woocommerce'), esc_html($blogname), '<strong>' . esc_html($user_login) . '</strong>'); ?></p>
<?php if ('yes' === get_option('woocommerce_registration_generate_password') && $password_generated) : ?>
<p><?php printf(__('Your password has been automatically generated: %s', 'woocommerce'), '<strong>' . esc_html($user_pass) . '</strong>'); ?></p>
<?php endif; ?>
<p><?php printf(__('You can access your account area to view your orders and change your password here: %s.', 'woocommerce'), make_clickable(esc_url(wc_get_page_permalink('myaccount')))); ?></p>
<?php do_action('woocommerce_email_footer', $email);
您希望在哪裏添加新的代碼?有兩個動作鉤子,'woocommerce_email_header'和'woocommerce_email_footer',可能可以用於。 – helgatheviking
我很想在「謝謝創建賬戶」一行之後添加它。我可以只複製當前<?php if(語句,但輸入我自己的消息)的格式? 感謝! –