Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( ! empty( $items['create'] ) ) {
- $total += count( $items['create'] );
- }
- if ( ! empty( $items['update'] ) ) {
- $total += count( $items['update'] );
- }
- if ( ! empty( $items['delete'] ) ) {
- $total += count( $items['delete'] );
- }
- if ( $total > $limit ) {
- /* translators: %s: items limit */
- return new WP_Error( 'woocommerce_rest_request_entity_too_large', sprintf( __( 'Unable to accept more than %s items for this request.', 'woocommerce' ), $limit ), array( 'status' => 413 ) );
- }
- return true;
Add Comment
Please, Sign In to add comment