ContextHandler
in package

Keeps track of the page "context"

Table of Contents

Constants

ACCOUNT  : mixed = 'shop'
ADD_PAYMENT_METHOD  : mixed = 'add_payment_method'
CART  : mixed = 'cart'
CHECKOUT  : mixed = 'checkout'
ORDER_PAY  : mixed = 'order_pay'
ORDER_RECEIVED  : mixed = 'order_received'
PRODUCT  : mixed = 'product'
SHOP  : mixed = 'shop'

Properties

$context  : string
$order  : WC_Order

Methods

__construct()  : mixed
get_context()  : mixed
get_order_from_query()  : mixed
get_product_id()  : array<string|int, mixed>|false|mixed|string|WC_Product|WC_Product_Variable|null
has_context()  : mixed
initialize()  : mixed
is_add_payment_method()  : mixed
is_cart()  : mixed
is_cart_block()  : bool
is_checkout()  : mixed
is_checkout_block()  : mixed
is_checkout_shortcode()  : mixed
is_frontend()  : mixed
is_order_pay()  : mixed
is_order_received()  : mixed
is_product()  : mixed
is_product_block()  : bool
is_shop()  : mixed
set_context()  : mixed
set_order()  : mixed
is_context()  : mixed

Constants

Properties

Methods

get_product_id()

public get_product_id() : array<string|int, mixed>|false|mixed|string|WC_Product|WC_Product_Variable|null
Return values
array<string|int, mixed>|false|mixed|string|WC_Product|WC_Product_Variable|null

has_context()

public has_context([mixed $contexts = [] ]) : mixed
Parameters
$contexts : mixed = []

        
On this page

Search results