As the documentation of woocommerce REST API (v3) stated, by default the REST API is limited to up to 100 objects to be created, updated or deleted. https://woocommerce.github.io/woocommerce-rest-api-docs/#batch-update-products I'm wondering if it is possible to remove this limitation totally or set the limit a bit higher (to 1000 or so). Thanks!
The WooCommerce REST API is an interface that you can use to access your WooCommerce store from outside WordPress. It was designed to make it easy for WooCommerce stores on WordPress to interact with other websites and applications over the Internet.
To enable the legacy REST API within WooCommerce, go to WooCommerce > Settings > Advanced > Legacy API and tick the Enable the legacy REST API checkbox.
Finally found the answer here: https://wordpress.stackexchange.com/questions/304237/increase-product-variation-limit-in-woocommerce
just add the lines below to wp-includes/functions.php
function wpse_rest_batch_items_limit( $limit ) {
$limit = 1000;
return $limit;
}
add_filter( 'woocommerce_rest_batch_items_limit', 'wpse_rest_batch_items_limit' );
Hello Try This code in function.php
function update_limit_for_products( $limit, $products ) {
$limit = 1000;
return $limit;
}
add_filter( 'woocommerce_api_bulk_limit', 'update_limit_for_products', 10, 2 );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With