PHP Class WC_Form_Handler

Author: WooThemes
Show file Open project: woocommerce/woocommerce Class Usage Examples

Public Methods

Method Description
add_payment_method_action ( ) Process the add payment method form.
add_to_cart_action ( boolean $url = false ) Add to cart action.
cancel_order ( ) Cancel a pending order.
checkout_action ( ) Process the checkout form.
delete_payment_method_action ( ) Process the delete payment method form.
init ( ) Hook in methods.
order_again ( ) Place a previous order again.
pay_action ( ) Process the pay form.
process_login ( ) Process the login form.
process_lost_password ( ) Handle lost password form.
process_registration ( ) Process the registration form.
process_reset_password ( ) Handle reset password form.
redirect_reset_password_link ( ) Remove key and login from querystring, set cookie, and redirect to account page to show the form.
save_account_details ( ) Save the password/account details and redirect back to the my account page.
save_address ( ) Save and and update a billing or shipping address if the form was submitted through the user account page.
set_default_payment_method_action ( ) Process the delete payment method form.
update_cart_action ( ) Remove from cart/update.

Private Methods

Method Description
add_to_cart_handler_grouped ( integer $product_id ) : boolean Handle adding grouped products to the cart.
add_to_cart_handler_simple ( integer $product_id ) : boolean Handle adding simple products to the cart.
add_to_cart_handler_variable ( integer $product_id ) : boolean Handle adding variable products to the cart.

Method Details

add_payment_method_action() public static method

Process the add payment method form.
public static add_payment_method_action ( )

add_to_cart_action() public static method

Checks for a valid request, does validation (via hooks) and then redirects if valid.
public static add_to_cart_action ( boolean $url = false )
$url boolean (default: false)

cancel_order() public static method

Cancel a pending order.
public static cancel_order ( )

checkout_action() public static method

Process the checkout form.
public static checkout_action ( )

delete_payment_method_action() public static method

Process the delete payment method form.
public static delete_payment_method_action ( )

init() public static method

Hook in methods.
public static init ( )

order_again() public static method

Place a previous order again.
public static order_again ( )

pay_action() public static method

Process the pay form.
public static pay_action ( )

process_login() public static method

Process the login form.
public static process_login ( )

process_lost_password() public static method

Handle lost password form.
public static process_lost_password ( )

process_registration() public static method

Process the registration form.
public static process_registration ( )

process_reset_password() public static method

Handle reset password form.
public static process_reset_password ( )

save_account_details() public static method

Save the password/account details and redirect back to the my account page.
public static save_account_details ( )

save_address() public static method

Save and and update a billing or shipping address if the form was submitted through the user account page.
public static save_address ( )

set_default_payment_method_action() public static method

Process the delete payment method form.

update_cart_action() public static method

Remove from cart/update.
public static update_cart_action ( )