Last active
February 1, 2024 09:22
-
-
Save vyskoczilova/020a007a191075c2774f87b7ebdf47c8 to your computer and use it in GitHub Desktop.
WooCommerce: My Account Orders Pagination - per page setting
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
<?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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@wpressall Do you have a solution for pagination in my account / downloads ? I would also be very happy to have it. Thanks!