WooCommerce Code Reference

WC_Admin_Profile
in package

WC_Admin_Profile Class.

Table of Contents

__construct()  : mixed
Hook in tabs.
add_customer_meta_fields()  : mixed
Show Address Fields on edit user pages.
get_customer_meta_fields()  : array
Get Address Fields for the edit user pages.
save_customer_meta_fields()  : mixed
Save Address Fields on edit user pages.
get_user_meta()  : string
Get user meta for a given key, with fallbacks to core user info for pre-existing fields.

Methods

add_customer_meta_fields()

Show Address Fields on edit user pages.

public add_customer_meta_fields(WP_User $user) : mixed
Parameters
$user : WP_User
Return values
mixed

get_customer_meta_fields()

Get Address Fields for the edit user pages.

public get_customer_meta_fields() : array
Return values
arrayFields to display which are filtered through woocommerce_customer_meta_fields before being returned

save_customer_meta_fields()

Save Address Fields on edit user pages.

public save_customer_meta_fields(int $user_id) : mixed
Parameters
$user_id : int

User ID of the user being saved

Return values
mixed

get_user_meta()

Get user meta for a given key, with fallbacks to core user info for pre-existing fields.

protected get_user_meta(int $user_id, string $key) : string
Parameters
$user_id : int

User ID of the user being edited

$key : string

Key for user meta field

Tags
since
3.1.0
Return values
string