From 8d339a7022f3eb55e51553ec29872a504b6fb9f5 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 28 Apr 2015 15:10:29 -0300 Subject: [PATCH] Stop yoda! --- includes/api/class-wc-api-products.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); }