Code Duplication    Length = 10-10 lines in 3 locations

includes/api/legacy/v1/class-wc-api-customers.php 1 location

@@ 36-45 (lines=10) @@
33
	 * @param WC_API_Server $server
34
	 * @return WC_API_Customers
35
	 */
36
	public function __construct( WC_API_Server $server ) {
37
38
		parent::__construct( $server );
39
40
		// add customer data to order responses
41
		add_filter( 'woocommerce_api_order_response', array( $this, 'add_customer_data' ), 10, 2 );
42
43
		// modify WP_User_Query to support created_at date filtering
44
		add_action( 'pre_user_query', array( $this, 'modify_user_query' ) );
45
	}
46
47
	/**
48
	 * Register the routes for this class

includes/api/legacy/v2/class-wc-api-customers.php 1 location

@@ 35-44 (lines=10) @@
32
	 * @param WC_API_Server $server
33
	 * @return WC_API_Customers
34
	 */
35
	public function __construct( WC_API_Server $server ) {
36
37
		parent::__construct( $server );
38
39
		// add customer data to order responses
40
		add_filter( 'woocommerce_api_order_response', array( $this, 'add_customer_data' ), 10, 2 );
41
42
		// modify WP_User_Query to support created_at date filtering
43
		add_action( 'pre_user_query', array( $this, 'modify_user_query' ) );
44
	}
45
46
	/**
47
	 * Register the routes for this class

includes/api/legacy/v3/class-wc-api-customers.php 1 location

@@ 35-44 (lines=10) @@
32
	 * @param WC_API_Server $server
33
	 * @return WC_API_Customers
34
	 */
35
	public function __construct( WC_API_Server $server ) {
36
37
		parent::__construct( $server );
38
39
		// add customer data to order responses
40
		add_filter( 'woocommerce_api_order_response', array( $this, 'add_customer_data' ), 10, 2 );
41
42
		// modify WP_User_Query to support created_at date filtering
43
		add_action( 'pre_user_query', array( $this, 'modify_user_query' ) );
44
	}
45
46
	/**
47
	 * Register the routes for this class