Woocommerce email template with hyperlink

This topic has 6 replies, 4 voices, and was last updated 8 years, 8 months ago ago by Robert Hall

  • Avatar: lindo_web
    Simon
    Participant
    March 22, 2016 at 14:42

    Hi guys. This issue is more about Woocommerce than the template, but any suggestions are welcome.

    Have added a hyperlink to the processing email template, which does not work properly:

    `<?php
    /**
    * Customer processing order email
    *
    * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-processing-order.php.
    *
    * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer).
    * will need to copy the new files to your theme to maintain compatibility. We try to do this.
    * as little as possible, but it does happen. When this occurs the version of the template file will.
    * be bumped and the readme will list any important changes.
    *
    * @see http://docs.woothemes.com/document/template-structure/
    * @author WooThemes
    * @package WooCommerce/Templates/Emails
    * @version 2.5.0
    */

    if ( ! defined( ‘ABSPATH’ ) ) {
    exit;
    }

    /**
    * @hooked WC_Emails::email_header() Output the email header
    */
    do_action( ‘woocommerce_email_header’, $email_heading, $email ); ?>

    <p><?php _e( “We will get your order dispatched as soon as possible and let you know when it has been sent. In the meantime if you have a query then please call us on 0111 100 1106 or visit our website.”, ‘woocommerce’ ); ?></p>

    <?php

    /**
    * @hooked WC_Emails::order_details() Shows the order details table.
    * @since 2.5.0
    */
    do_action( ‘woocommerce_email_order_details’, $order, $sent_to_admin, $plain_text, $email );

    /**
    * @hooked WC_Emails::order_meta() Shows order meta data.
    */
    do_action( ‘woocommerce_email_order_meta’, $order, $sent_to_admin, $plain_text, $email );

    /**
    * @hooked WC_Emails::customer_details() Shows customer details
    * @hooked WC_Emails::email_address() Shows email address
    */
    do_action( ‘woocommerce_email_customer_details’, $order, $sent_to_admin, $plain_text, $email );

    /**
    * @hooked WC_Emails::email_footer() Output the email footer
    */
    do_action( ‘woocommerce_email_footer’, $email );

    Any suggestions are welcome how I can replace this code to make it work.

    Thanks,
    G

    5 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    March 22, 2016 at 16:01

    Hello,

    Please specify what exactly you’ve edited in the template and what you’re trying to achieve.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: lindo_web
    Simon
    Participant
    March 22, 2016 at 16:11

    This is the only part I have edited:

    <p><?php _e( “We will get your order dispatched as soon as possible and let you know when it has been sent. In the meantime if you have a query then please call us on 0xxx or visit our <a href="http://www.domain.com">website</a>.”, ‘woocommerce’ ); ?></p>

    <?php

    I have changed only the text and added the <a href="http://www.domain.com">website</a> html. Workes fine if I remove the HTML, but not when included.

    Thanks,
    G

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    March 22, 2016 at 18:05

    Hello,

    Try the following code
    <p><?php _e( 'We will get your order dispatched as soon as possible and let you know when it has been sent. In the meantime if you have a query then please call us on 0xxx or visit our <a href="http://www.domain.com">website</a>.', 'woocommerce' ); ?></p>

    Best regards,
    Jack Richardson.

    Avatar: lindo_web
    Simon
    Participant
    March 31, 2016 at 09:59

    Worked. Thank you for the help. Please close this case.

    Avatar: Robert Hall
    Robert Hall
    Support staff
    March 31, 2016 at 10:08

    Hello,

    You’re welcome!

    Regards,
    Robert Hall

  • Viewing 6 results - 1 through 6 (of 6 total)

The issue related to '‘Woocommerce email template with hyperlink’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.