WC_API_Customers::__construct( WC_API_Server $server )

Setup class, overridden to provide customer data to order response


Description Description


Parameters Parameters

$server

(Required)


Top ↑

Source Source

File: includes/legacy/api/v2/class-wc-api-customers.php

	public function __construct( WC_API_Server $server ) {

		parent::__construct( $server );

		// add customer data to order responses
		add_filter( 'woocommerce_api_order_response', array( $this, 'add_customer_data' ), 10, 2 );

		// modify WP_User_Query to support created_at date filtering
		add_action( 'pre_user_query', array( $this, 'modify_user_query' ) );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.1 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.