Introduces new actions for account orders
This commit is contained in:
parent
1354766978
commit
5107d1dbc6
|
@ -22,11 +22,18 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$customer_orders = new WP_Query( wc_get_account_orders_query_args( $current_page ) );
|
$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' ); ?>
|
wc_get_template( 'myaccount/navigation.php' ); ?>
|
||||||
|
|
||||||
<div class="my-account-content">
|
<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">
|
<table class="shop_table shop_table_responsive my_account_orders account-orders-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -100,6 +107,8 @@ wc_get_template( 'myaccount/navigation.php' ); ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<?php do_action( 'woocommerce_before_account_orders_pagination' ); ?>
|
||||||
|
|
||||||
<?php if ( 1 < $customer_orders->max_num_pages ) : ?>
|
<?php if ( 1 < $customer_orders->max_num_pages ) : ?>
|
||||||
<div class="wc-account-orders-pagination">
|
<div class="wc-account-orders-pagination">
|
||||||
<?php if ( 1 !== $current_page ) : ?>
|
<?php if ( 1 !== $current_page ) : ?>
|
||||||
|
@ -120,4 +129,7 @@ wc_get_template( 'myaccount/navigation.php' ); ?>
|
||||||
<?php _e( 'No order has been made yet.', 'woocommerce' ); ?>
|
<?php _e( 'No order has been made yet.', 'woocommerce' ); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php do_action( 'woocommerce_after_account_orders', $has_orders ); ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue