Added better links for orders pagination

This commit is contained in:
Claudio Sanches 2016-01-19 19:17:07 -02:00
parent 489000a3c2
commit 08048b6d1c
1 changed files with 2 additions and 2 deletions

View File

@ -104,11 +104,11 @@ wc_get_template( 'myaccount/navigation.php' ); ?>
<?php if ( 1 < $customer_orders->max_num_pages ) : ?>
<div class="wc-account-orders-pagination">
<?php if ( 1 !== $current_page ) : ?>
<a class="button" href="?orders-page=<?php echo esc_attr( $current_page - 1 ); ?>"><?php _e( 'Previous', 'woocommerce' ); ?></a>
<a class="button" href="<?php echo esc_url( add_query_arg( array( 'orders-page' => $current_page - 1 ) ) ); ?>"><?php _e( 'Previous', 'woocommerce' ); ?></a>
<?php endif; ?>
<?php if ( $current_page !== intval( $customer_orders->max_num_pages ) ) : ?>
<a class="button" href="?orders-page=<?php echo esc_attr( $current_page + 1 ); ?>"><?php _e( 'Next', 'woocommerce' ); ?></a>
<a class="button" href="<?php echo esc_url( add_query_arg( array( 'orders-page' => $current_page + 1 ) ) ); ?>"><?php _e( 'Next', 'woocommerce' ); ?></a>
<?php endif; ?>
</div>
<?php endif; ?>