Checkout
Checkout class.
Description Description
Source Source
File: packages/woocommerce-blocks/src/StoreApi/Routes/Checkout.php
Methods Methods
- __construct — Constructor accepts two types of schema; one for the item being returned, and one for the cart as a whole. These may be the same depending on the route.
- add_data_to_error_object — Adds additional data to the WP_Error object.
- create_or_update_draft_order — Create or update a draft order based on the cart.
- get_args — Get method arguments for this REST route.
- get_draft_order_id — Gets draft order data from the customer session.
- get_path — Get the path of this REST route.
- get_request_payment_data — Gets and formats payment request data.
- get_request_payment_method — Gets the chosen payment method from the request.
- get_request_payment_method_id — Gets the chosen payment method ID from the request.
- get_route_error_response — Get route response when something went wrong.
- get_route_error_response_from_object — Get route response when something went wrong.
- get_route_post_response — Update and process an order.
- get_route_response — Convert the cart into a new draft order, or update an existing draft order, and return an updated cart response.
- get_route_update_response — Update the current order.
- is_valid_draft_order — Whether the passed argument is a draft order or an order that is pending/failed and the cart hasn't changed.
- prepare_item_for_response — Prepare a single item for response. Handles setting the status based on the payment result.
- process_customer — Order processing relating to customer account.
- process_payment — Fires an action hook instructing active payment gateways to process the payment for an order and provide a result.
- process_without_payment — For orders which do not require payment, just update status.
- requires_nonce — Checks if a nonce is required for the route.
- set_draft_order_id — Updates draft order data in the customer session.
- update_customer_from_request — Updates the current customer session using data from the request (e.g. address data).
- update_order_from_request — Update the current order using the posted values from the request.