Stop yoda!

This commit is contained in:
Claudio Sanches 2015-04-28 15:10:29 -03:00
parent 8303d50830
commit 8d339a7022
1 changed files with 1 additions and 1 deletions

View File

@ -2344,7 +2344,7 @@ class WC_API_Products extends WC_API_Resource {
$limit = apply_filters( 'woocommerce_api_bulk_limit', 100, 'products' ); $limit = apply_filters( 'woocommerce_api_bulk_limit', 100, 'products' );
// Limit bulk operation // 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 ); 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 );
} }