Skip to content

Instantly share code, notes, and snippets.

@maddisondesigns
Created December 13, 2024 08:59
Show Gist options
  • Save maddisondesigns/2cbfada3923d50bc685e3aee7bac43df to your computer and use it in GitHub Desktop.
Save maddisondesigns/2cbfada3923d50bc685e3aee7bac43df to your computer and use it in GitHub Desktop.
Increase the number of orders shown on the Orders page in My Acccount within WooCommerce
/**
* Increase the number of orders shown on the Orders page in My Acccount
*/
function mytheme_my_account_orders( $args ) {
// Use -1 to display all orders
$args['posts_per_page'] = 20;
return $args;
}
add_filter( 'woocommerce_my_account_my_orders_query', 'mytheme_my_account_orders', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment