WC_Shortcode_My_Account
in package
Shortcode my account class.
Table of Contents
- add_payment_method() : mixed
- Show the add payment method page.
- check_password_reset_key() : WP_User|bool
- Retrieves a user row based on password reset key and login.
- edit_account() : mixed
- Edit account details page.
- edit_address() : mixed
- Edit address page.
- get() : string
- Get the shortcode content.
- lost_password() : mixed
- Lost password page handling.
- output() : mixed
- Output the shortcode.
- reset_password() : mixed
- Handles resetting the user's password.
- retrieve_password() : bool
- Handles sending password retrieval email to customer.
- set_reset_password_cookie() : mixed
- Set or unset the cookie.
- view_order() : mixed
- View order page.
- my_account() : mixed
- My account page.
Methods
add_payment_method()
Show the add payment method page.
public
static add_payment_method() : mixed
Return values
mixed —check_password_reset_key()
Retrieves a user row based on password reset key and login.
public
static check_password_reset_key(string $key, string $login) : WP_User|bool
Parameters
- $key : string
-
Hash to validate sending user's password.
- $login : string
-
The user login.
Tags
Return values
WP_User|bool — User's database row on success, false for invalid keysedit_account()
Edit account details page.
public
static edit_account() : mixed
Return values
mixed —edit_address()
Edit address page.
public
static edit_address([string $load_address = 'billing' ]) : mixed
Parameters
- $load_address : string = 'billing'
-
Type of address; 'billing' or 'shipping'.
Return values
mixed —get()
Get the shortcode content.
public
static get(array<string|int, mixed> $atts) : string
Parameters
- $atts : array<string|int, mixed>
-
Shortcode attributes.
Return values
string —lost_password()
Lost password page handling.
public
static lost_password() : mixed
Return values
mixed —output()
Output the shortcode.
public
static output(array<string|int, mixed> $atts) : mixed
Parameters
- $atts : array<string|int, mixed>
-
Shortcode attributes.
Return values
mixed —reset_password()
Handles resetting the user's password.
public
static reset_password(object $user, string $new_pass) : mixed
Parameters
- $user : object
-
The user.
- $new_pass : string
-
New password for the user in plaintext.
Return values
mixed —retrieve_password()
Handles sending password retrieval email to customer.
public
static retrieve_password() : bool
Based on retrieve_password() in core wp-login.php.
Tags
Return values
bool — True: when finish. False: on errorset_reset_password_cookie()
Set or unset the cookie.
public
static set_reset_password_cookie([string $value = '' ]) : mixed
Parameters
- $value : string = ''
-
Cookie value.
Return values
mixed —view_order()
View order page.
public
static view_order(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
Return values
mixed —my_account()
My account page.
private
static my_account(array<string|int, mixed> $atts) : mixed
Parameters
- $atts : array<string|int, mixed>
-
Shortcode attributes.