Code Duplication    Length = 3-3 lines in 3 locations

includes/abstracts/abstract-wc-rest-crud-controller.php 1 location

@@ 298-300 (lines=3) @@
295
		}
296
297
		// Set after into date query. Date query must be specified as an array of an array.
298
		if ( isset( $request['after'] ) ) {
299
			$args['date_query'][0]['after'] = $request['after'];
300
		}
301
302
		// Force the post_type argument, since it's not a user input variable.
303
		$args['post_type'] = $this->post_type;

includes/abstracts/abstract-wc-rest-posts-controller.php 1 location

@@ 328-330 (lines=3) @@
325
		}
326
327
		// Set after into date query. Date query must be specified as an array of an array.
328
		if ( isset( $request['after'] ) ) {
329
			$args['date_query'][0]['after'] = $request['after'];
330
		}
331
332
		if ( 'wc/v1' === $this->namespace ) {
333
			if ( is_array( $request['filter'] ) ) {

includes/api/class-wc-rest-product-reviews-controller.php 1 location

@@ 290-292 (lines=3) @@
287
		}
288
289
		// Set after into date query. Date query must be specified as an array of an array.
290
		if ( isset( $registered['after'], $request['after'] ) ) {
291
			$prepared_args['date_query'][0]['after'] = $request['after'];
292
		}
293
294
		if ( isset( $registered['page'] ) && empty( $request['offset'] ) ) {
295
			$prepared_args['offset'] = $prepared_args['number'] * ( absint( $request['page'] ) - 1 );