Last active
August 4, 2018 09:46
-
-
Save edmundcwm/2991a445cced88fb51b9a06a1514f38b to your computer and use it in GitHub Desktop.
Woocommerce: Display order item thumbnails in transaction emails
This file contains 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