WordPress at Your Fingertips
function is not described

WC_API_Customers::__construct() public WC 2.1

Setup class, overridden to provide customer data to order response

{} It's a method of the class: WC_API_Customers{}

No Hooks.


null. Nothing.


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


Since 2.1 Introduced.

Code of WC_API_Customers::__construct() WC 5.6.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' ) );