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<string|int, mixed>
- 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
__construct()
Hook in tabs.
public
__construct() : mixed
Return values
mixed —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<string|int, mixed>
Return values
array<string|int, mixed> — Fields to display which are filtered through woocommerce_customer_meta_fields before being returnedsave_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