简体   繁体   中英

Link not working in WooCommerce Vendor Email

I am looking to insert a link to a Google Document into a woocommerce email template. I have overridden the template, saved it in the file directories stated by WooCommerce help and is is still not sending the right content. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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