Forked from edmundcwm/edm-display-product-thumbnail-in-emails.php
Created
August 4, 2018 09:46
-
-
Save freezvd/958faab18233cb985dfe2e947ddc07ff to your computer and use it in GitHub Desktop.
Woocommerce: Display order item thumbnails in transaction emails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Enable order item thumbnail display in emails | |
* Change order item thumbnail size | |
* @see woocommerce/includes/wc-template-functions.php for hook | |
*/ | |
function edm_display_product_thumbnail_in_emails( $args ) { | |
/* Display image thumbnail in emails */ | |
$args['show_image'] = true; | |
/* Edit image thumbnail size in px. Array( width, height ) */ | |
$args['image_size'] = array( 64, 64 ); | |
return $args; | |
} | |
add_filter( 'woocommerce_email_order_items_args', 'edm_display_product_thumbnail_in_emails' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment