WC_API_Customers::__construct()publicWC 2.1

Setup class, overridden to provide customer data to order response

Method of the class: WC_API_Customers{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_API_Customers = new WC_API_Customers();
$WC_API_Customers->__construct( $server );
$server(WC_API_Server) (required)
-

Changelog

Since 2.1 Introduced.

WC_API_Customers::__construct() code WC 8.7.0

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' ) );
}