Stop yoda!
This commit is contained in:
parent
8303d50830
commit
8d339a7022
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue