PHP Class WC_Shortcode_My_Account

Shows the 'my account' section where the customer can view past orders and update their information.
Author: WooThemes
Datei anzeigen Open project: woocommerce/woocommerce Class Usage Examples

Public Methods

Method Description
add_payment_method ( ) Show the add payment method page.
check_password_reset_key ( string $key, string $login ) : WP_User | boolean Retrieves a user row based on password reset key and login.
edit_account ( ) Edit account details page.
edit_address ( string $load_address = 'billing' ) Edit address page.
get ( array $atts ) : string Get the shortcode content.
lost_password ( ) Lost password page handling.
output ( array $atts ) Output the shortcode.
reset_password ( object $user, string $new_pass ) Handles resetting the user's password.
retrieve_password ( ) : boolean Handles sending password retrieval email to customer.
set_reset_password_cookie ( $value = '' ) Set or unset the cookie.
view_order ( integer $order_id ) View order page.

Private Methods

Method Description
my_account ( array $atts ) My account page.

Method Details

add_payment_method() public static method

Show the add payment method page.
public static add_payment_method ( )

check_password_reset_key() public static method

Retrieves a user row based on password reset key and login.
public static check_password_reset_key ( string $key, string $login ) : WP_User | boolean
$key string Hash to validate sending user's password
$login string The user login
return WP_User | boolean User's database row on success, false for invalid keys

edit_account() public static method

Edit account details page.
public static edit_account ( )

edit_address() public static method

Edit address page.
public static edit_address ( string $load_address = 'billing' )
$load_address string

get() public static method

Get the shortcode content.
public static get ( array $atts ) : string
$atts array
return string

lost_password() public static method

Lost password page handling.
public static lost_password ( )

output() public static method

Output the shortcode.
public static output ( array $atts )
$atts array

reset_password() public static method

Handles resetting the user's password.
public static reset_password ( object $user, string $new_pass )
$user object The user
$new_pass string New password for the user in plaintext

retrieve_password() public static method

Based on retrieve_password() in core wp-login.php.
public static retrieve_password ( ) : boolean
return boolean True: when finish. False: on error

view_order() public static method

View order page.
public static view_order ( integer $order_id )
$order_id integer