WC_Form_Handler
in package
WC_Form_Handler class.
Table of Contents
- add_payment_method_action() : mixed
- Process the add payment method form.
- add_to_cart_action() : mixed
- Add to cart action.
- cancel_order() : mixed
- Cancel a pending order.
- checkout_action() : mixed
- Process the checkout form.
- delete_payment_method_action() : mixed
- Process the delete payment method form.
- init() : mixed
- Hook in methods.
- order_again() : mixed
- Place a previous order again.
- pay_action() : mixed
- Process the pay form.
- process_login() : mixed
- Process the login form.
- process_lost_password() : mixed
- Handle lost password form.
- process_registration() : mixed
- Process the registration form.
- process_reset_password() : mixed
- Handle reset password form.
- redirect_reset_password_link() : mixed
- Remove key and user ID (or user login, as a fallback) from query string, set cookie, and redirect to account page to show the form.
- save_account_details() : mixed
- Save the password/account details and redirect back to the my account page.
- save_address() : mixed
- Save and and update a billing or shipping address if the form was submitted through the user account page.
- set_default_payment_method_action() : mixed
- Process the delete payment method form.
- update_cart_action() : mixed
- Remove from cart/update.
- add_to_cart_handler_grouped() : bool
- Handle adding grouped products to the cart.
- add_to_cart_handler_simple() : bool
- Handle adding simple products to the cart.
- add_to_cart_handler_variable() : bool
- Handle adding variable products to the cart.
Methods
add_payment_method_action()
Process the add payment method form.
public
static add_payment_method_action() : mixed
Return values
mixed —add_to_cart_action()
Add to cart action.
public
static add_to_cart_action([bool $url = false ]) : mixed
Checks for a valid request, does validation (via hooks) and then redirects if valid.
Parameters
- $url : bool = false
-
(default: false) URL to redirect to.
Return values
mixed —cancel_order()
Cancel a pending order.
public
static cancel_order() : mixed
Return values
mixed —checkout_action()
Process the checkout form.
public
static checkout_action() : mixed
Return values
mixed —delete_payment_method_action()
Process the delete payment method form.
public
static delete_payment_method_action() : mixed
Return values
mixed —init()
Hook in methods.
public
static init() : mixed
Return values
mixed —order_again()
Place a previous order again.
public
static order_again() : mixed
Tags
Return values
mixed —pay_action()
Process the pay form.
public
static pay_action() : mixed
Tags
Return values
mixed —process_login()
Process the login form.
public
static process_login() : mixed
Tags
Return values
mixed —process_lost_password()
Handle lost password form.
public
static process_lost_password() : mixed
Return values
mixed —process_registration()
Process the registration form.
public
static process_registration() : mixed
Tags
Return values
mixed —process_reset_password()
Handle reset password form.
public
static process_reset_password() : mixed
Return values
mixed —redirect_reset_password_link()
Remove key and user ID (or user login, as a fallback) from query string, set cookie, and redirect to account page to show the form.
public
static redirect_reset_password_link() : mixed
Return values
mixed —save_account_details()
Save the password/account details and redirect back to the my account page.
public
static save_account_details() : mixed
Return values
mixed —save_address()
Save and and update a billing or shipping address if the form was submitted through the user account page.
public
static save_address() : mixed
Return values
mixed —set_default_payment_method_action()
Process the delete payment method form.
public
static set_default_payment_method_action() : mixed
Return values
mixed —update_cart_action()
Remove from cart/update.
public
static update_cart_action() : mixed
Return values
mixed —add_to_cart_handler_grouped()
Handle adding grouped products to the cart.
private
static add_to_cart_handler_grouped(int $product_id) : bool
Parameters
- $product_id : int
-
Product ID to add to the cart.
Tags
Return values
bool — success or notadd_to_cart_handler_simple()
Handle adding simple products to the cart.
private
static add_to_cart_handler_simple(int $product_id) : bool
Parameters
- $product_id : int
-
Product ID to add to the cart.
Tags
Return values
bool — success or notadd_to_cart_handler_variable()
Handle adding variable products to the cart.
private
static add_to_cart_handler_variable(int $product_id) : bool
Parameters
- $product_id : int
-
Product ID to add to the cart.