Show customer details for logged in users only.
Possibly for [2.5] after confirming with @claudiosmweb and @justinshreve. #10433
This commit is contained in:
parent
fa2280f3f8
commit
14e03038e3
|
@ -13,7 +13,7 @@
|
|||
* @see http://docs.woothemes.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.5.0
|
||||
* @version 2.5.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -22,7 +22,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' ) ) );
|
||||
$show_purchase_note = $order->has_status( apply_filters( 'woocommerce_purchase_note_order_statuses', array( 'completed', 'processing' ) ) );
|
||||
$show_customer_details = is_user_logged_in() && $order->get_user_id() === get_current_user_id();
|
||||
?>
|
||||
<h2><?php _e( 'Order Details', 'woocommerce' ); ?></h2>
|
||||
<table class="shop_table order_details">
|
||||
|
@ -66,4 +67,6 @@ $show_purchase_note = $order->has_status( apply_filters( 'woocommerce_purchase_n
|
|||
|
||||
<?php do_action( 'woocommerce_order_details_after_order_table', $order ); ?>
|
||||
|
||||
<?php wc_get_template( 'order/order-details-customer.php', array( 'order' => $order ) ); ?>
|
||||
<?php if ( $show_customer_details ) : ?>
|
||||
<?php wc_get_template( 'order/order-details-customer.php', array( 'order' => $order ) ); ?>
|
||||
<?php endif; ?>
|
||||
|
|
Loading…
Reference in New Issue