Skip to content

Commit

Permalink
fix: if customer billing or shipping address is not found, show not f…
Browse files Browse the repository at this point in the history
…ound message (#591)
  • Loading branch information
saimonh3 authored and sabbir1991 committed Mar 22, 2019
1 parent 4adbf97 commit 6399674
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions templates/orders/details.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,13 @@
<div class="dokan-panel dokan-panel-default">
<div class="dokan-panel-heading"><strong><?php esc_html_e( 'Billing Address', 'dokan-lite' ); ?></strong></div>
<div class="dokan-panel-body">
<?php echo wp_kses_post( $order->get_formatted_billing_address() ); ?>
<?php
if ( $order->get_formatted_billing_address() ) {
echo wp_kses_post( $order->get_formatted_billing_address() );
} else {
_e( 'No billing address set.', 'dokan-lite' );
}
?>
</div>
</div>
</div>
Expand All @@ -133,7 +139,13 @@
<div class="dokan-panel dokan-panel-default">
<div class="dokan-panel-heading"><strong><?php esc_html_e( 'Shipping Address', 'dokan-lite' ); ?></strong></div>
<div class="dokan-panel-body">
<?php echo wp_kses_post( $order->get_formatted_shipping_address() ); ?>
<?php
if ( $order->get_formatted_shipping_address() ) {
echo wp_kses_post( $order->get_formatted_shipping_address() );
} else {
_e( 'No shipping address set.', 'dokan-lite' );
}
?>
</div>
</div>
</div>
Expand Down Expand Up @@ -195,7 +207,7 @@
<?php echo esc_html( dokan_get_date_created( $order ) ); ?>
</li>
</ul>
<?php if ( $hide_customer_info == 'off' ) : ?>
<?php if ( 'off' === $hide_customer_info && ( $order->get_formatted_billing_address() || $order->get_formatted_shipping_address() ) ) : ?>
<ul class="list-unstyled customer-details">
<li>
<span><?php esc_html_e( 'Customer:', 'dokan-lite' ); ?></span>
Expand Down

0 comments on commit 6399674

Please sign in to comment.