프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$calculated_shipping | string | Stores if user has calculated shipping in this session. | |
$data | array | Stores customer data. | |
$is_vat_exempt | string | Stores if user is VAT exempt for this session. | |
$password | string | Stores a password if this needs to be changed. Write-only and hidden from _data. |
메소드 | 설명 | |
---|---|---|
__construct ( WC_Customer | integer $data, boolean $is_session = false ) | Load customer data based on how WC_Customer is called. | |
delete_and_reassign ( integer $reassign = null ) : boolean | Delete a customer and reassign posts. | |
get_avatar_url ( ) : string | Return this customer's avatar. | |
get_billing_address ( string $context = 'view' ) : string | Get billing_address_1. | |
get_billing_address_1 ( string $context = 'view' ) : string | Get billing_address_1. | |
get_billing_address_2 ( string $context = 'view' ) : string | Get billing_address_2. | |
get_billing_city ( string $context = 'view' ) : string | Get billing_city. | |
get_billing_company ( string $context = 'view' ) : string | Get billing_company. | |
get_billing_country ( string $context = 'view' ) : string | Get billing_country. | |
get_billing_email ( string $context = 'view' ) : string | Get billing_email. | |
get_billing_first_name ( string $context = 'view' ) : string | Get billing_first_name. | |
get_billing_last_name ( string $context = 'view' ) : string | Get billing_last_name. | |
get_billing_phone ( string $context = 'view' ) : string | Get billing_phone. | |
get_billing_postcode ( string $context = 'view' ) : string | Get billing_postcode. | |
get_billing_state ( string $context = 'view' ) : string | Get billing_state. | |
get_calculated_shipping ( ) : boolean | Has customer calculated shipping? | |
get_date_created ( string $context = 'view' ) : integer | Return the date this customer was created. | |
get_date_modified ( string $context = 'view' ) : integer | Return the date this customer was last updated. | |
get_downloadable_products ( ) : array | Gets a customer's downloadable products. | |
get_email ( string $context = 'view' ) : string | Return the customer's email. | |
get_first_name ( string $context = 'view' ) : string | Return customer's first name. | |
get_is_paying_customer ( string $context = 'view' ) : boolean | Is the user a paying customer? | |
get_is_vat_exempt ( ) : boolean | Get if customer is VAT exempt? | |
get_last_name ( string $context = 'view' ) : string | Return customer's last name. | |
get_last_order ( ) : WC_Order | false | Gets the customers last order. | |
get_order_count ( ) : integer | Return the number of orders this customer has. | |
get_password ( ) : string | Get password (only used when updating the user object). | |
get_role ( string $context = 'view' ) : string | Return customer's user role. | |
get_shipping_address ( string $context = 'view' ) : string | Get shipping_address_1. | |
get_shipping_address_1 ( string $context = 'view' ) : string | Get shipping_address_1. | |
get_shipping_address_2 ( string $context = 'view' ) : string | Get shipping_address_2. | |
get_shipping_city ( string $context = 'view' ) : string | Get shipping_city. | |
get_shipping_company ( string $context = 'view' ) : string | Get shipping_company. | |
get_shipping_country ( string $context = 'view' ) : string | Get shipping_country. | |
get_shipping_first_name ( string $context = 'view' ) : string | Get shipping_first_name. | |
get_shipping_last_name ( string $context = 'view' ) : string | Get shipping_last_name. | |
get_shipping_postcode ( string $context = 'view' ) : string | Get shipping_postcode. | |
get_shipping_state ( string $context = 'view' ) : string | Get shipping_state. | |
get_taxable_address ( ) : array | Get taxable address. | |
get_total_spent ( ) : float | Return how much money this customer has spent. | |
get_username ( string $context = 'view' ) : string | Return the customer's username. | |
has_calculated_shipping ( ) : boolean | Has calculated shipping? | |
is_customer_outside_base ( ) : boolean | Is customer outside base country (for tax purposes)? | |
is_vat_exempt ( ) : boolean | Is customer VAT exempt? | |
set_billing_address ( string $value ) | Set billing_address_1. | |
set_billing_address_1 ( string $value ) | Set billing_address_1. | |
set_billing_address_2 ( string $value ) | Set billing_address_2. | |
set_billing_address_to_base ( ) | Set customer address to match shop base address. | |
set_billing_city ( string $value ) | Set billing_city. | |
set_billing_company ( string $value ) | Set billing_company. | |
set_billing_country ( string $value ) | Set billing_country. | |
set_billing_email ( string $value ) | Set billing_email. | |
set_billing_first_name ( string $value ) | Set billing_first_name. | |
set_billing_last_name ( string $value ) | Set billing_last_name. | |
set_billing_location ( string $country, string $state, string $postcode = '', string $city = '' ) | Sets all address info at once. | |
set_billing_phone ( string $value ) | Set billing_phone. | |
set_billing_postcode ( string $value ) | Set billing_postcode. | |
set_billing_state ( string $value ) | Set billing_state. | |
set_calculated_shipping ( boolean $calculated = true ) | Calculated shipping? | |
set_date_created ( integer $timestamp ) | Set the date this customer was last updated. | |
set_date_modified ( integer $timestamp ) | Set the date this customer was last updated. | |
set_email ( string $value ) | Set customer's email. | |
set_first_name ( string $first_name ) | Set customer's first name. | |
set_is_paying_customer ( boolean $is_paying_customer ) | Set if the user a paying customer. | |
set_is_vat_exempt ( boolean $is_vat_exempt ) | Set if customer has tax exemption. | |
set_last_name ( string $last_name ) | Set customer's last name. | |
set_password ( string $password ) | Set customer's password. | |
set_role ( mixed $role ) | Set customer's user role(s). | |
set_shipping_address ( string $value ) | Set shipping_address_1. | |
set_shipping_address_1 ( string $value ) | Set shipping_address_1. | |
set_shipping_address_2 ( string $value ) | Set shipping_address_2. | |
set_shipping_address_to_base ( ) | Set customer shipping address to base address. | |
set_shipping_city ( string $value ) | Set shipping_city. | |
set_shipping_company ( string $value ) | Set shipping_company. | |
set_shipping_country ( string $value ) | Set shipping_country. | |
set_shipping_first_name ( string $value ) | Set shipping_first_name. | |
set_shipping_last_name ( string $value ) | Set shipping_last_name. | |
set_shipping_location ( string $country, string $state = '', string $postcode = '', string $city = '' ) | Sets all shipping info at once. | |
set_shipping_postcode ( string $value ) | Set shipping_postcode. | |
set_shipping_state ( string $value ) | Set shipping_state. | |
set_username ( string $username ) | Set customer's username. |
메소드 | 설명 | |
---|---|---|
get_address_prop ( string $prop, string $address = 'billing', string $context = 'view' ) : mixed | Gets a prop for a getter method. | |
get_hook_prefix ( ) : string | Prefix for action and filter hooks on data. | |
set_address_prop ( string $prop, string $address = 'billing', mixed $value ) | Sets a prop for a setter method. |
public __construct ( WC_Customer | integer $data, boolean $is_session = false ) | ||
$data | WC_Customer | integer | Customer ID or data. |
$is_session | boolean | True if this is the customer session |
public delete_and_reassign ( integer $reassign = null ) : boolean | ||
$reassign | integer | Reassign posts and links to new User ID. |
리턴 | boolean |
public get_billing_address ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_billing_address_1 ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_billing_address_2 ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string | $value |
public get_billing_city ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string | $value |
public get_billing_company ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_billing_country ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_billing_email ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_billing_first_name ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_billing_last_name ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_billing_phone ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_billing_postcode ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_billing_state ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_calculated_shipping ( ) : boolean | ||
리턴 | boolean |
public get_date_created ( string $context = 'view' ) : integer | ||
$context | string | |
리턴 | integer |
public get_date_modified ( string $context = 'view' ) : integer | ||
$context | string | |
리턴 | integer |
public get_downloadable_products ( ) : array | ||
리턴 | array | Array of downloadable products |
public get_first_name ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
protected get_hook_prefix ( ) : string | ||
리턴 | string |
public get_is_paying_customer ( string $context = 'view' ) : boolean | ||
$context | string | |
리턴 | boolean |
public get_is_vat_exempt ( ) : boolean | ||
리턴 | boolean |
public get_last_name ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_last_order ( ) : WC_Order | false | ||
리턴 | WC_Order | false |
public get_order_count ( ) : integer | ||
리턴 | integer |
public get_password ( ) : string | ||
리턴 | string |
public get_shipping_address ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_shipping_address_1 ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_shipping_address_2 ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_shipping_city ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_shipping_company ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_shipping_country ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_shipping_first_name ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_shipping_last_name ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_shipping_postcode ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_shipping_state ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public get_total_spent ( ) : float | ||
리턴 | float |
public get_username ( string $context = 'view' ) : string | ||
$context | string | |
리턴 | string |
public has_calculated_shipping ( ) : boolean | ||
리턴 | boolean |
public is_customer_outside_base ( ) : boolean | ||
리턴 | boolean |
public set_billing_address ( string $value ) | ||
$value | string |
public set_billing_address_1 ( string $value ) | ||
$value | string |
public set_billing_address_2 ( string $value ) | ||
$value | string |
public set_billing_address_to_base ( ) |
public set_billing_company ( string $value ) | ||
$value | string |
public set_billing_country ( string $value ) | ||
$value | string |
public set_billing_email ( string $value ) | ||
$value | string |
public set_billing_first_name ( string $value ) | ||
$value | string |
public set_billing_last_name ( string $value ) | ||
$value | string |
public set_billing_phone ( string $value ) | ||
$value | string |
public set_billing_postcode ( string $value ) | ||
$value | string |
public set_billing_state ( string $value ) | ||
$value | string |
public set_calculated_shipping ( boolean $calculated = true ) | ||
$calculated | boolean |
public set_date_created ( integer $timestamp ) | ||
$timestamp | integer |
public set_date_modified ( integer $timestamp ) | ||
$timestamp | integer |
public set_first_name ( string $first_name ) | ||
$first_name | string |
public set_is_paying_customer ( boolean $is_paying_customer ) | ||
$is_paying_customer | boolean |
public set_is_vat_exempt ( boolean $is_vat_exempt ) | ||
$is_vat_exempt | boolean |
public set_last_name ( string $last_name ) | ||
$last_name | string |
public set_password ( string $password ) | ||
$password | string |
public set_shipping_address ( string $value ) | ||
$value | string |
public set_shipping_address_1 ( string $value ) | ||
$value | string |
public set_shipping_address_2 ( string $value ) | ||
$value | string |
public set_shipping_address_to_base ( ) |
public set_shipping_city ( string $value ) | ||
$value | string |
public set_shipping_company ( string $value ) | ||
$value | string |
public set_shipping_country ( string $value ) | ||
$value | string |
public set_shipping_first_name ( string $value ) | ||
$value | string |
public set_shipping_last_name ( string $value ) | ||
$value | string |
public set_shipping_postcode ( string $value ) | ||
$value | string |
public set_shipping_state ( string $value ) | ||
$value | string |
public set_username ( string $username ) | ||
$username | string |
protected string $calculated_shipping | ||
리턴 | string |
protected string $is_vat_exempt | ||
리턴 | string |
protected string $password | ||
리턴 | string |