Added better links for orders pagination
This commit is contained in:
parent
489000a3c2
commit
08048b6d1c
|
@ -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; ?>
|
||||
|
|
Loading…
Reference in New Issue