woocommerce_admin_get_user_data_fields
Filter user data fields exposed over the WordPress user endpoint.
Usage
add_filter( 'woocommerce_admin_get_user_data_fields', 'wp_kama_woocommerce_admin_get_user_data_fields_filter' ); /** * Function for `woocommerce_admin_get_user_data_fields` filter-hook. * * @param array $fields Array of fields to expose over the WP user endpoint. * * @return array */ function wp_kama_woocommerce_admin_get_user_data_fields_filter( $fields ){ // filter... return $fields; }
- $fields(array)
- Array of fields to expose over the WP user endpoint.
Changelog
Since 4.0.0 | Introduced. |
Where the hook is called
woocommerce_admin_get_user_data_fields
woocommerce/src/Internal/Admin/WCAdminUser.php 116
return apply_filters( 'woocommerce_admin_get_user_data_fields', array( 'variable_product_tour_shown' ) );
Where the hook is used in WooCommerce
woocommerce/src/Admin/Features/ProductBlockEditor/Init.php 63
add_filter( 'woocommerce_admin_get_user_data_fields', array( $this, 'add_user_data_fields' ) );
woocommerce/src/Internal/Admin/ActivityPanels.php 35
add_filter( 'woocommerce_admin_get_user_data_fields', array( $this, 'add_user_data_fields' ) );
woocommerce/src/Internal/Admin/Analytics.php 60
add_filter( 'woocommerce_admin_get_user_data_fields', array( $this, 'add_user_data_fields' ) );
woocommerce/src/Internal/Admin/Homescreen.php 41
add_filter( 'woocommerce_admin_get_user_data_fields', array( $this, 'add_user_data_fields' ) );
woocommerce/src/Internal/Admin/MobileAppBanner.php 32
add_filter( 'woocommerce_admin_get_user_data_fields', array( $this, 'add_user_data_fields' ) );