WC_Shortcode_Checkout
in package
Shortcode checkout class.
Table of Contents
- get() : string
- Get the shortcode content.
- output() : mixed
- Output the shortcode.
- checkout() : mixed
- Show the checkout.
- guest_should_verify_email() : bool
- Tries to determine if the user's email address should be verified before rendering either the 'order received' or 'order pay' pages. This should only be applied to guest orders.
- order_pay() : mixed
- Show the pay page.
- order_received() : mixed
- Show the thanks page.
Methods
get()
Get the shortcode content.
public
static get(array<string|int, mixed> $atts) : string
Parameters
- $atts : array<string|int, mixed>
-
Shortcode attributes.
Return values
string —output()
Output the shortcode.
public
static output(array<string|int, mixed> $atts) : mixed
Parameters
- $atts : array<string|int, mixed>
-
Shortcode attributes.
Return values
mixed —checkout()
Show the checkout.
private
static checkout() : mixed
Return values
mixed —guest_should_verify_email()
Tries to determine if the user's email address should be verified before rendering either the 'order received' or 'order pay' pages. This should only be applied to guest orders.
private
static guest_should_verify_email(WC_Order $order, string $context) : bool
Parameters
- $order : WC_Order
-
The order for which a need for email verification is being determined.
- $context : string
-
The context in which email verification is being tested.
Return values
bool —order_pay()
Show the pay page.
private
static order_pay(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
Tags
Return values
mixed —order_received()
Show the thanks page.
private
static order_received(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.