diff --git a/includes/api/class-wc-api-products.php b/includes/api/class-wc-api-products.php index feb2901048e..07dd63c532d 100644 --- a/includes/api/class-wc-api-products.php +++ b/includes/api/class-wc-api-products.php @@ -2344,7 +2344,7 @@ class WC_API_Products extends WC_API_Resource { $limit = apply_filters( 'woocommerce_api_bulk_limit', 100, 'products' ); // Limit bulk operation - if ( $limit < count( $data ) ) { + if ( count( $data ) > $limit ) { throw new WC_API_Exception( 'woocommerce_api_products_request_entity_too_large', sprintf( __( 'Unable to accept more than %s items for this request', 'woocommerce' ), $limit ), 413 ); }