简体   繁体   English

链接在WooCommerce供应商电子邮件中不起作用

[英]Link not working in WooCommerce Vendor Email

I am looking to insert a link to a Google Document into a woocommerce email template. 我想在woocommerce电子邮件模板中插入指向Google文档的链接。 I have overridden the template, saved it in the file directories stated by WooCommerce help and is is still not sending the right content. 我已经覆盖了模板,将其保存在WooCommerce帮助说明的文件目录中,但仍未发送正确的内容。 It is a vendor email with instructions on how to set up the shop for when the Vendor account is approved. 这是一封供应商电子邮件,其中包含有关在批准供应商帐户时如何设置商店的说明。

Here is the email Code: 这是电子邮件代码:

/**
 * The template for displaying demo plugin content.
 *
 * Override this template by copying it to yourtheme/dc-product-
vendor/emails/approved-vendor-account.php
 *
 * @author      WC Marketplace
 * @package     dc-product-vendor/Templates
 * @version   0.0.1
 */

global $WCMp;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 
?>
<?php do_action( 'woocommerce_email_header', $email_heading ); ?>
<p><?php printf( __( "Congratulations! There is a new vendor application on 
%s.", 'dc-woocommerce-multi-vendor' ), get_option( 'blogname' ) ); ?></p>
<p>
    <?php _e( "Application status: Approved",  'dc-woocommerce-multi-vendor' 
); ?><br/>
    <?php printf( __( "Applicant Username: %s",  'dc-woocommerce-multi-
vendor' ), $user_login ); ?>
</p>
<p><?php _e('You have been cleared for landing! Click this link to get your 
Vendor Account Set-Up Instructions: <a 
href="https://drive.google.com/file/d/1Lpcmfki13PzO03Wd7vY3-
Ojwf93AsC5H/view?usp=sharing"> Click here </a>
Congratulations and welcome aboard!', 'dc-woocommerce-multi-vendor') ?> <p>
<?php do_action( 'wcmp_email_footer' );?>

I want to keep all of the text the same, just add the link for the vendors to click on once their account is approved so they can get instructions on setting up their shop properly. 我希望所有文字保持不变,只需添加链接,供供应商在其帐户获得批准后点击,以便他们获得正确设置商店的说明。

The result I get now is that it continues to send the default email template message, not showing any changes that I have made to it. 我现在得到的结果是它将继续发送默认的电子邮件模板消息,而不显示我对其所做的任何更改。

Thanks for the help :) 谢谢您的帮助 :)

I know the reply is too late and you must have figured out a way by now. 我知道答复为时已晚,您现在必须已经找到一种方法。 However, the reply might be useful for people facing the same/similar issue. 但是,该回复对于面临相同/相似问题的人们可能很有用。 The only thing I can figure out, that can cause your default template to run instead of your email template is: 我能弄清的唯一一件事是,它可能导致您运行默认模板而不是电子邮件模板:

You might not be creating the proper path for the file to be overridden. 您可能没有为要覆盖的文件创建正确的路径。 Make sure you have created a folder 'dc-product-vendor' in your theme, inside it, create an 'emails' folder and then save your code in a PHP file of 'approved-vendor-account.php' name. 确保在主题中创建了文件夹“ dc-product-vendor” ,在其中创建了“ emails”文件夹,然后将代码保存在名为“ approved-vendor-account.php”的PHP文件中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM