Created
December 13, 2024 08:59
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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