diff --git a/templates/order/order-details-item.php b/templates/order/order-details-item.php
index 73265105952..050d0b9b7a9 100644
--- a/templates/order/order-details-item.php
+++ b/templates/order/order-details-item.php
@@ -4,7 +4,7 @@
*
* @author WooThemes
* @package WooCommerce/Templates
- * @version 2.4.0
+ * @version 2.5.0
*/
if ( ! defined( 'ABSPATH' ) ) {
@@ -35,7 +35,7 @@ if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
get_formatted_line_subtotal( $item ); ?>
-has_status( array( 'completed', 'processing' ) ) && ( $purchase_note = get_post_meta( $product->id, '_purchase_note', true ) ) ) : ?>
+
|
diff --git a/templates/order/order-details.php b/templates/order/order-details.php
index 74742425144..4dc8f9fcbc3 100644
--- a/templates/order/order-details.php
+++ b/templates/order/order-details.php
@@ -4,7 +4,7 @@
*
* @author WooThemes
* @package WooCommerce/Templates
- * @version 2.4.0
+ * @version 2.5.0
*/
if ( ! defined( 'ABSPATH' ) ) {
@@ -12,6 +12,8 @@ if ( ! defined( 'ABSPATH' ) ) {
}
$order = wc_get_order( $order_id );
+
+$show_purchase_note = $order->has_status( apply_filters( 'woocommerce_purchase_note_order_statuses', array( 'completed', 'processing' ) ) );
?>
@@ -24,11 +26,16 @@ $order = wc_get_order( $order_id );
get_items() as $item_id => $item ) {
+ $product = apply_filters( 'woocommerce_order_item_product', $order->get_product_from_item( $item ), $item );
+ $purchase_note = get_post_meta( $product->id, '_purchase_note', true );
+
wc_get_template( 'order/order-details-item.php', array(
- 'order' => $order,
- 'item_id' => $item_id,
- 'item' => $item,
- 'product' => apply_filters( 'woocommerce_order_item_product', $order->get_product_from_item( $item ), $item )
+ 'order' => $order,
+ 'item_id' => $item_id,
+ 'item' => $item,
+ 'show_purchase_note' => $show_purchase_note,
+ 'purchase_note' => $purchase_note,
+ 'product' => $product,
) );
}
?>