skip to Main Content

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!

2

Answers


  1. Chosen as BEST ANSWER

    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' );
    

  2. 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 );
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search