WC_Stripe_Controller_Checkout
extends WC_Stripe_Rest_Controller
in package
uses
WC_Stripe_Controller_Frontend_Trait
Tags
Table of Contents
Properties
- $error : WP_Error
- $namespace : mixed
- $gateway : WC_Payment_Gateway_Stripe
- $order_review : mixed
- $request : WP_REST_Request
Methods
- admin_permission_check() : mixed
- after_checkout_validation() : mixed
- checkout_order_processed() : mixed
- filter_posted_data() : mixed
- post_payment_processes() : mixed
- process_checkout() : WP_REST_Response
- Process the WC Order
- process_order_pay() : WP_REST_Response
- process_payment() : mixed
- register_routes() : mixed
- Register all routes that the controller uses.
- rest_uri() : mixed
- rest_url() : mixed
- set_stashed_cart() : mixed
- validate_payment_method() : mixed
- validate_rest_nonce() : bool|WP_Error
- add_validation_error() : mixed
- Allows a status code of 200 to be returned even if there is a validation error.
- cart_includes() : mixed
- empty_cart() : void
- frontend_includes() : mixed
- get_error_messages() : mixed
- get_messages() : mixed
- get_supported_gateways() : mixed
- register_authenticated_route() : mixed
- actions() : mixed
- create_customer() : mixed
- get_order_review_url() : mixed
- required_post_data() : mixed
- send_response() : mixed
Properties
$error
protected
WP_Error
$error
= \null
$namespace
protected
mixed
$namespace
= ''
$gateway
private
WC_Payment_Gateway_Stripe
$gateway
= \null
$order_review
private
mixed
$order_review
= \false
$request
private
WP_REST_Request
$request
Tags
Methods
admin_permission_check()
public
admin_permission_check(WP_REST_Request $request) : mixed
Parameters
- $request : WP_REST_Request
after_checkout_validation()
public
after_checkout_validation(array<string|int, mixed> $data, WP_Error $errors) : mixed
Parameters
- $data : array<string|int, mixed>
- $errors : WP_Error
checkout_order_processed()
public
checkout_order_processed(int $order_id, array<string|int, mixed> $posted_data, WC_Order $order) : mixed
Parameters
- $order_id : int
- $posted_data : array<string|int, mixed>
- $order : WC_Order
filter_posted_data()
public
filter_posted_data(mixed $data) : mixed
Parameters
- $data : mixed
Tags
post_payment_processes()
public
post_payment_processes(mixed $order, mixed $gateway) : mixed
Parameters
- $order : mixed
- $gateway : mixed
process_checkout()
Process the WC Order
public
process_checkout(WP_REST_Request $request) : WP_REST_Response
Parameters
- $request : WP_REST_Request
Return values
WP_REST_Responseprocess_order_pay()
public
process_order_pay(WP_REST_Request $request) : WP_REST_Response
Parameters
- $request : WP_REST_Request
Tags
Return values
WP_REST_Responseprocess_payment()
public
process_payment(WP_REST_Request $request) : mixed
Parameters
- $request : WP_REST_Request
Tags
register_routes()
Register all routes that the controller uses.
public
register_routes() : mixed
rest_uri()
public
rest_uri([mixed $uri = '' ]) : mixed
Parameters
- $uri : mixed = ''
rest_url()
public
rest_url([mixed $uri = '' ]) : mixed
Parameters
- $uri : mixed = ''
set_stashed_cart()
public
set_stashed_cart(WC_Order $order, WC_Payment_Gateway_Stripe $gateway) : mixed
Parameters
- $order : WC_Order
- $gateway : WC_Payment_Gateway_Stripe
validate_payment_method()
public
validate_payment_method(mixed $payment_method) : mixed
Parameters
- $payment_method : mixed
validate_rest_nonce()
public
validate_rest_nonce(mixed $request) : bool|WP_Error
Parameters
- $request : mixed
Tags
Return values
bool|WP_Erroradd_validation_error()
Allows a status code of 200 to be returned even if there is a validation error.
protected
add_validation_error(WP_Error $error) : mixed
Parameters
- $error : WP_Error
cart_includes()
protected
cart_includes() : mixed
empty_cart()
protected
empty_cart(WC_Cart $cart) : void
Parameters
- $cart : WC_Cart
frontend_includes()
protected
frontend_includes() : mixed
get_error_messages()
protected
get_error_messages() : mixed
get_messages()
protected
get_messages([mixed $types = 'all' ]) : mixed
Parameters
- $types : mixed = 'all'
get_supported_gateways()
protected
get_supported_gateways([mixed $context = 'product' ]) : mixed
Parameters
- $context : mixed = 'product'
register_authenticated_route()
protected
register_authenticated_route(string $route) : mixed
Parameters
- $route : string
actions()
private
actions() : mixed
create_customer()
private
create_customer(WP_REST_Request $request) : mixed
Parameters
- $request : WP_REST_Request
get_order_review_url()
private
get_order_review_url() : mixed
required_post_data()
private
required_post_data() : mixed
send_response()
private
send_response(mixed $success[, mixed $defaults = array() ]) : mixed
Parameters
- $success : mixed
- $defaults : mixed = array()