Checkout_Processing implements Premium_Service, Registerable
Loads the various scripts and styles needed for the cart modal
Tags
Interfaces, Classes and Traits
- Premium_Service
- Registerable
Table of Contents
- $settings : mixed
- __construct() : mixed
- Constructor
- additional_checkout_data() : array<string|int, mixed>
- Adds default data to the checkout api schema for Fast Cart retrieval
- additional_checkout_schema() : array<string|int, mixed>
- Adds default data to the checkout api schema for Fast Cart retrieval
- filter_checkout_complete_params() : void
- Filters checkout parameters used during the receipt template redirect
- maybe_add_wfc_checkout_field() : mixed
- Adds field to checkout fields indicating checkout through WFC
- maybe_add_wfc_login_field() : mixed
- Adds field to checkout login form to properly redirect after login
- maybe_apply_wfc_key() : string
- Checks to see if user checked out through fast cart and adds parameter to redirect url
- maybe_get_payment_template() : string
- Replace payment confirmation template with WFC template
- maybe_get_success_template() : string
- Redirect order confirmation to WFC template
- maybe_redirect_login() : string
- Take user back to Fast Cart checkout after logging in.
- maybe_redirect_order_completed_url() : string
- Redirect the order received URL to WFC template
- maybe_redirect_payment_processing_url() : array<string|int, mixed>
- Redirect the page to WFC template for later processing to open outside the checkout iframe
- register() : void
- Install checkout template filters and actions.
- save_wfc_checkout_field() : void
- Adds meta value to order if user checked out through fast cart.
Properties
$settings
private
mixed
$settings
Tags
Methods
__construct()
Constructor
public
__construct() : mixed
Tags
Return values
mixed —additional_checkout_data()
Adds default data to the checkout api schema for Fast Cart retrieval
public
additional_checkout_data() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —additional_checkout_schema()
Adds default data to the checkout api schema for Fast Cart retrieval
public
additional_checkout_schema() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —filter_checkout_complete_params()
Filters checkout parameters used during the receipt template redirect
public
filter_checkout_complete_params(array<string|int, mixed> $params) : void
Parameters
- $params : array<string|int, mixed>
-
The parameters passed to the checkout JS
Tags
Return values
void —maybe_add_wfc_checkout_field()
Adds field to checkout fields indicating checkout through WFC
public
maybe_add_wfc_checkout_field(mixed $fields) : mixed
Parameters
- $fields : mixed
-
checkout form fields
Tags
Return values
mixed —new fields
maybe_add_wfc_login_field()
Adds field to checkout login form to properly redirect after login
public
maybe_add_wfc_login_field() : mixed
Tags
Return values
mixed —maybe_apply_wfc_key()
Checks to see if user checked out through fast cart and adds parameter to redirect url
public
maybe_apply_wfc_key(array<string|int, mixed> $result, object $order) : string
Parameters
- $result : array<string|int, mixed>
-
redirection parameters array
- $order : object
-
WC_Order object
Tags
Return values
string —new redirection array
maybe_get_payment_template()
Replace payment confirmation template with WFC template
public
maybe_get_payment_template(string $template) : string
Parameters
- $template : string
-
template path
Tags
Return values
string —new template
maybe_get_success_template()
Redirect order confirmation to WFC template
public
maybe_get_success_template(string $template) : string
Parameters
- $template : string
-
template path
Tags
Return values
string —new template
maybe_redirect_login()
Take user back to Fast Cart checkout after logging in.
public
maybe_redirect_login(mixed $url) : string
Parameters
- $url : mixed
Tags
Return values
string —New URL
maybe_redirect_order_completed_url()
Redirect the order received URL to WFC template
public
maybe_redirect_order_completed_url(string $url, WC_Order $order) : string
Parameters
- $url : string
-
the original redirect url
- $order : WC_Order
-
post id of the order
Tags
Return values
string —new redirection url
maybe_redirect_payment_processing_url()
Redirect the page to WFC template for later processing to open outside the checkout iframe
public
maybe_redirect_payment_processing_url(array<string|int, mixed> $result, string $order_id) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>
-
the redirection details
- $order_id : string
-
post id of the order
Tags
Return values
array<string|int, mixed> —new redirection values
register()
Install checkout template filters and actions.
public
register() : void
Tags
Return values
void —save_wfc_checkout_field()
Adds meta value to order if user checked out through fast cart.
public
save_wfc_checkout_field(mixed $order) : void
Not strictly necessary when using the checkout block API but worth adding anyway.
Parameters
- $order : mixed