I searched this issue and tried several solution with no luck.
My main route is here: https://cnperformance.wpengine.com/wp-json/wp/v2/products?_embed
I installed the 'WP REST API filter parameter' plugin to restore filter removed when REST API moved to WordPress core.
I've tried: https://cnperformance.wpengine.com/wp-json/wp/v2/products?_embed&?filter[per_page]=-1
and
https://cnperformance.wpengine.com/wp-json/wp/v2/products?_embed&?filter[posts_per_page]=-1
I've also tried this in functions.php
add_filter( 'rest_endpoints', function( $endpoints ){
if ( ! isset( $endpoints['/wp/v2/products'] ) ) {
return $endpoints;
}
unset( $endpoints['/wp/v2/products'][0]['args']['per_page']['maximum'] );
return $endpoints;
});
reference here: https://github.com/WP-API/WP-API/issues/2316
I've set the value of posts_per_page to 100, -1, didn't make a difference. I also tried just adding the parameters '&posts_per_page=-1 without the filter query and that didn't work either. Any help or insights greatly appreciated!