WooCommerce Code Reference

Search results

WC_Admin_Profile

WC_Admin_Profile Class.

Table of Contents

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

Methods

get_customer_meta_fields()

Get Address Fields for the edit user pages.

public get_customer_meta_fields( ) : array
Return values
array

Fields to display which are filtered through woocommerce_customer_meta_fields before being returned

add_customer_meta_fields()

Show Address Fields on edit user pages.

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

save_customer_meta_fields()

Save Address Fields on edit user pages.

public save_customer_meta_fields( $user_id : int ) : 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( $user_id : int , $key : string ) : string
Parameters
$user_id : int

User ID of the user being edited

$key : string

Key for user meta field

Tags
since
Return values
string
Back to the top