From c05804a8fb61ad1f0ff8598db60eb6c7247a7b3f Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Thu, 13 Feb 2014 02:08:47 -0200 Subject: [PATCH 1/2] fixed hardcode string in email-order-items.php template --- templates/emails/email-order-items.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/emails/email-order-items.php b/templates/emails/email-order-items.php index 90daa9d9c8b..bede723077a 100644 --- a/templates/emails/email-order-items.php +++ b/templates/emails/email-order-items.php @@ -20,7 +20,7 @@ foreach ( $items as $item ) : // Show title/image etc if ( $show_image ) - echo apply_filters( 'woocommerce_order_item_thumbnail', 'Product Image', $item ); + echo apply_filters( 'woocommerce_order_item_thumbnail', '' . __( 'Product Image', 'woocommerce' ) . '', $item ); // Product name echo apply_filters( 'woocommerce_order_item_name', $item['name'], $item ); @@ -62,4 +62,4 @@ foreach ( $items as $item ) : - \ No newline at end of file + From 3e82329bc49c7854826caf1f191b65a5dc355fa9 Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Thu, 13 Feb 2014 02:10:53 -0200 Subject: [PATCH 2/2] fixed some coding standards in templates/emails/email-order-items.php --- templates/emails/email-order-items.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/templates/emails/email-order-items.php b/templates/emails/email-order-items.php index bede723077a..cdabb92765e 100644 --- a/templates/emails/email-order-items.php +++ b/templates/emails/email-order-items.php @@ -4,10 +4,12 @@ * * @author WooThemes * @package WooCommerce/Templates/Emails - * @version 2.1.0 + * @version 2.1.2 */ -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly +} global $woocommerce; @@ -19,15 +21,17 @@ foreach ( $items as $item ) : id ), 'thumbnail') ) .'" alt="' . __( 'Product Image', 'woocommerce' ) . '" height="' . esc_attr( $image_size[1] ) . '" width="' . esc_attr( $image_size[0] ) . '" style="vertical-align:middle; margin-right: 10px;" />', $item ); + } // Product name echo apply_filters( 'woocommerce_order_item_name', $item['name'], $item ); // SKU - if ( $show_sku && $_product->get_sku() ) + if ( $show_sku && $_product->get_sku() ) { echo ' (#' . $_product->get_sku() . ')'; + } // File URLs if ( $show_download_links && $_product->exists() && $_product->is_downloadable() ) { @@ -40,16 +44,18 @@ foreach ( $items as $item ) : if ( count( $download_files ) > 1 ) { $prefix = sprintf( __( 'Download %d', 'woocommerce' ), $i ); - } elseif ( $i == 1 ) + } elseif ( $i == 1 ) { $prefix = __( 'Download', 'woocommerce' ); + } echo '
' . $prefix . ': ' . esc_html( $file['name'] ) . ''; } } // Variation - if ( $item_meta->meta ) + if ( $item_meta->meta ) { echo '
' . nl2br( $item_meta->display( true, true ) ) . ''; + } ?>