I am trying to get orders by user id. I have tried this and not working.

          <?php echo do_shortcode("[woocommerce_view_order per_page='20']"); ?>

is there any way to put pagination to show all of order history?

I also wonder which file, function I need to modify if I want to add "see more" button at the bottom of the order page show 10 each when it's clicked. we may work on "see more" button with ajax.



It appears the shortcode uses the key order_count and not per_page. You can modify this on the View Order page, where the shortcode exists.

[woocommerce_view_order order_count="20"]

If you would want some kind of AJAX order loader you may have to make some significant changes.

A note order_count also accepts the parameter all which will get all orders. Perhaps that is a solution?


The shortcode uses the template file myaccount/my-orders.php. You could modify this to look through a certain amount of orders, seperate them into seperate divs and have it show the additional divs with each button press.

It is also in this template file where they actually get all the orders, so you could add a paged parameter to this and quite easily do the AJAX content load.

  • thanks! I don't know why I couldn't find it on woo commerce shortcode document. how did you know that? anyway, you saved my day! – pulla Nov 1 '13 at 8:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.