Created
January 15, 2021 09:09
-
-
Save yousufansa/c3099edc156789922db1c97d8848b6e1 to your computer and use it in GitHub Desktop.
WooCommerce - Show 6 woocommerce orders per page in "my account" page
This file contains hidden or 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
if ( ! function_exists( 'wc_customize_my_account_orders_limit' ) ) { | |
function wc_customize_my_account_orders_limit( $args ) { | |
// Set the posts per page | |
$args['posts_per_page'] = 6; | |
return $args; | |
} | |
} | |
add_filter( 'woocommerce_my_account_my_orders_query', 'wc_customize_my_account_orders_limit' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment