WooCommerce Code Reference

WC_Shortcode_My_Account

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

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
uses

$wpdb WordPress Database object.

Return values
WP_User|boolUser's database row on success, false for invalid keys

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

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
uses

$wpdb WordPress Database object

Return values
boolTrue: when finish. False: on error