Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vyskoczilova/020a007a191075c2774f87b7ebdf47c8 to your computer and use it in GitHub Desktop.
Save vyskoczilova/020a007a191075c2774f87b7ebdf47c8 to your computer and use it in GitHub Desktop.
WooCommerce: My Account Orders Pagination - per page setting
<?php // don't copy this line
/**
* @snippet WooCommerce: My Account Orders Pagination - per page setting
* @source https://kybernaut.cz/?p=2896
* @author Karolína Vyskočilová (https://kybernaut.cz)
* @testedwith WordPress 5.2 & WooCommmerce 3.6.2
*/
// -------------------
function kbnt_my_account_orders( $args ) {
$args['posts_per_page'] = 15; // add number or -1 (display all orderes per page)
return $args;
}
add_filter( 'woocommerce_my_account_my_orders_query', 'kbnt_my_account_orders', 10, 1 );
@florian-hofmann-1977
Copy link

@wpressall Do you have a solution for pagination in my account / downloads ? I would also be very happy to have it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment