WCAdminUser::get_user_data_fields()publicWC 1.0

We store some WooCommerce specific user meta attached to users endpoint, so that we can track certain preferences or values such as the inbox activity panel last open time. Additional fields can be added in the function below, and then used via wc-admin's currentUser data.

Метод класса: WCAdminUser{}

Хуки из метода


Массив. Fields to expose over the WP user endpoint.


$WCAdminUser = new WCAdminUser();

Код WCAdminUser::get_user_data_fields() WC 9.1.2

public function get_user_data_fields() {
	 * Filter user data fields exposed over the WordPress user endpoint.
	 * @since 4.0.0
	 * @param array $fields Array of fields to expose over the WP user endpoint.
	return apply_filters( 'woocommerce_admin_get_user_data_fields', array( 'variable_product_tour_shown' ) );