CheckoutShortcode
extends AbstractShortcode
in package
Table of Contents
- BOOKING_CID_NAME = 'mphb-booking-checkout-id'
- NONCE_ACTION_BOOKING = 'mphb-booking'
- NONCE_ACTION_CHECKOUT = 'mphb-checkout'
- NONCE_NAME = 'mphb-checkout-nonce'
- RECOMMENDATION_NONCE_NAME = 'mphb-checkout-recommendation-nonce'
- STEP_BOOKING = 'booking'
- STEP_CHECKOUT = 'checkout'
- STEP_COMPLETE = 'complete'
- $currentStep : string
- $isCorrectNonce : mixed
- $isCorrectPage : mixed
- $name : mixed
- $steps : array<string|int, Step>
- __construct() : mixed
- addActions() : mixed
- enforceSSLRedirect() : mixed
- Handle redirections for SSL enforced checkouts
- filterErrorOutput() : mixed
- generateShortcode() : string
- getName() : mixed
- register() : mixed
- render() : string
- setup() : mixed
- showErrorsContent() : mixed
- buildOrderQuery() : array<string|int, mixed>
- checkNonce() : bool
- detectStep() : string
Constants
BOOKING_CID_NAME
public
mixed
BOOKING_CID_NAME
= 'mphb-booking-checkout-id'
NONCE_ACTION_BOOKING
public
mixed
NONCE_ACTION_BOOKING
= 'mphb-booking'
NONCE_ACTION_CHECKOUT
public
mixed
NONCE_ACTION_CHECKOUT
= 'mphb-checkout'
NONCE_NAME
public
mixed
NONCE_NAME
= 'mphb-checkout-nonce'
RECOMMENDATION_NONCE_NAME
public
mixed
RECOMMENDATION_NONCE_NAME
= 'mphb-checkout-recommendation-nonce'
STEP_BOOKING
public
mixed
STEP_BOOKING
= 'booking'
STEP_CHECKOUT
public
mixed
STEP_CHECKOUT
= 'checkout'
STEP_COMPLETE
public
mixed
STEP_COMPLETE
= 'complete'
Properties
$currentStep
protected
string
$currentStep
$isCorrectNonce
protected
mixed
$isCorrectNonce
= false
$isCorrectPage
protected
mixed
$isCorrectPage
= false
$name
protected
mixed
$name
= 'mphb_checkout'
$steps
protected
array<string|int, Step>
$steps
= array()
Methods
__construct()
public
__construct() : mixed
Return values
mixed —addActions()
public
addActions() : mixed
Return values
mixed —enforceSSLRedirect()
Handle redirections for SSL enforced checkouts
public
enforceSSLRedirect() : mixed
Return values
mixed —filterErrorOutput()
public
filterErrorOutput(mixed $error) : mixed
Parameters
- $error : mixed
Return values
mixed —generateShortcode()
public
generateShortcode([array<string|int, mixed> $attrs = array() ]) : string
Parameters
- $attrs : array<string|int, mixed> = array()
-
Attributes of shortcode
Return values
string —getName()
public
getName() : mixed
Return values
mixed —register()
public
register() : mixed
Return values
mixed —render()
public
render(array<string|int, mixed> $atts, string $content, string $shortcodeName) : string
Parameters
- $atts : array<string|int, mixed>
- $content : string
- $shortcodeName : string
Return values
string —setup()
public
setup() : mixed
Return values
mixed —showErrorsContent()
public
showErrorsContent(array<string|int, mixed> $errors) : mixed
Parameters
- $errors : array<string|int, mixed>
Return values
mixed —buildOrderQuery()
protected
buildOrderQuery(array<string|int, mixed> $atts, array<string|int, mixed> $defaults) : array<string|int, mixed>
Parameters
- $atts : array<string|int, mixed>
-
Shortcode attributes.
- $defaults : array<string|int, mixed>
-
Default values of "orderby" and "order" attributes.
Tags
Return values
array<string|int, mixed> —checkNonce()
protected
checkNonce() : bool
Return values
bool —detectStep()
protected
detectStep() : string