Skip to content

Commit

Permalink
Introduces new actions for account orders
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiosanches committed Feb 16, 2016
1 parent ad16a26 commit bcc9dd4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion templates/myaccount/orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@
}

$customer_orders = new WP_Query( wc_get_account_orders_query_args( $current_page ) );
$has_orders = $customer_orders->have_posts();

wc_print_notices();

wc_get_template( 'myaccount/navigation.php' ); ?>

<div class="my-account-content">
<?php if ( $customer_orders->have_posts() ) : ?>

<?php do_action( 'woocommerce_before_account_orders', $has_orders ); ?>

<?php if ( $has_orders ) : ?>

<table class="shop_table shop_table_responsive my_account_orders account-orders-table">
<thead>
<tr>
Expand Down Expand Up @@ -100,6 +107,8 @@
</tbody>
</table>

<?php do_action( 'woocommerce_before_account_orders_pagination' ); ?>

<?php if ( 1 < $customer_orders->max_num_pages ) : ?>
<div class="wc-account-orders-pagination">
<?php if ( 1 !== $current_page ) : ?>
Expand All @@ -120,4 +129,7 @@
<?php _e( 'No order has been made yet.', 'woocommerce' ); ?>
</div>
<?php endif; ?>

<?php do_action( 'woocommerce_after_account_orders', $has_orders ); ?>

</div>

0 comments on commit bcc9dd4

Please sign in to comment.