WC_API_Customers::__construct()
Setup class, overridden to provide customer data to order response
Метод класса: WC_API_Customers{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
$WC_API_Customers = new WC_API_Customers(); $WC_API_Customers->__construct( $server );
- $server(WC_API_Server) (обязательный)
- -
Список изменений
С версии 2.1 | Введена. |
Код WC_API_Customers::__construct() WC API Customers:: construct WC 7.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' ) ); }