Removing pagination from Woocommerce product variations

By default, from the edit product page, Woocommerce begins to paginate product variations once you have more than 20 for a single product. How can I remove this pagination, so that all product variations can be viewed at once from the edit screen, regardless of how many there are?

Related posts

4 comments

  1. The previous answer is an absolute no-go. NEVER change plugin core files.

    Please do the following:

    add the following line in your functions.php (preferably in your child-theme folder too)

    //Display 24 products on archive pages

    add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 24;' ), 20 );
    
  2. I achieved it thus (my use-case was to remove pagination entirely):

    add_filter('woocommerce_admin_meta_boxes_variations_per_page', function() {
        return PHP_INT_MAX;
    });
    
  3. By default WC set pagination as 15 variations but you can change it from below file

    /wp-content/plugins/woocommerce/includes/admin/class-wc-admin-assets.php
    
    line no 205
    
    'variations_per_page' => absint( apply_filters( 'woocommerce_admin_meta_boxes_variations_per_page', 15 ) )
    
    Replace 
    
    'variations_per_page' => absint( apply_filters( 'woocommerce_admin_meta_boxes_variations_per_page', 1000 ) )
    

Comments are closed.