Adding product image to WooCommerce Wishlist emails
-
Hi,
How do we add product images to the WooCommerce Wishlist emails that get sent when something gets in stock? The current email template that I have copied to my child theme looks like this:
<?php /** * Waitlist Mailout email (plain text) * * @author Neil Pie * @package WooCommerce_Waitlist/Templates/Emails/Plain * @version 1.2 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly do_action('woocommerce_email_header', $email_heading); ?> <p><?php echo _x( "Hi There,", 'Email salutation', 'woocommerce-waitlist' ); ?></p> <p><?php echo sprintf( __( '%1$s is now back in stock at %2$s.', 'woocommerce-waitlist' ), $product_title, get_bloginfo( 'name' ) ) . " "; echo __('You have been sent this email because your email address was registered on a waitlist for this product.', 'woocommerce-waitlist' ), $product_image; ?></p> <p><?php echo sprintf( __( 'If you would like to purchase %1$s please visit the following link: <a href="%2$s">%3$s</a>', 'woocommerce-waitlist' ), $product_title, $product_link, $product_link ); ?></p> <?php if ( WooCommerce_Waitlist_Plugin::persistent_waitlists_are_disabled() ) echo '<p>' , __('You have now been removed from the waitlist for this product.', 'woocommerce-waitlist' ) , '</p>'; do_action('woocommerce_email_footer'); ?>Does anyone have a clue how to add a product photo to this? I tried using below code with no success:
<div style="margin:15px auto;text-align:center"> <div class="product_image"><?php echo $product->get_image( 'shop_catalog' ); ?></div> <div class="product_title"><a href="<?php echo esc_url( add_query_arg( 'product_alert_sid', $session_id, $product->get_permalink() ) ); ?>"><?php echo $product->get_title(); ?></a></div> <div class="product_price"><?php echo $product->get_price_html(); ?></div> </div>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Adding product image to WooCommerce Wishlist emails’ is closed to new replies.