ExpressCheckoutRenderer
in package
Renders HTML containers for express payment buttons (Apple Pay, Google Pay, Link, etc.) on product, cart, mini-cart, and checkout pages.
Tags
Table of Contents
Properties
- $cart_button_position : string
- $product_button_position : string
- $registry : PaymentGatewayRegistry
Methods
- __construct() : mixed
- initialize() : mixed
- render_cart_buttons() : mixed
- Renders express payment buttons on the cart page.
- render_express_checkout() : mixed
- Renders the express checkout banner above the checkout form fields.
- render_mini_cart_buttons() : mixed
- Renders express payment buttons in the mini-cart widget.
- render_product_buttons() : mixed
- Renders express payment buttons on the product page.
- setup_cart_button_position() : mixed
- Sets up the cart button position from the filter and registers the cart hook.
- setup_product_button_position() : mixed
- Determines product button position from product meta and registers the appropriate hook.
Properties
$cart_button_position
private
string
$cart_button_position
= 'after'
$product_button_position
private
string
$product_button_position
= 'bottom'
$registry
private
PaymentGatewayRegistry
$registry
Methods
__construct()
public
__construct(PaymentGatewayRegistry $registry) : mixed
Parameters
- $registry : PaymentGatewayRegistry
initialize()
public
initialize() : mixed
render_cart_buttons()
Renders express payment buttons on the cart page.
public
render_cart_buttons() : mixed
render_express_checkout()
Renders the express checkout banner above the checkout form fields.
public
render_express_checkout() : mixed
render_mini_cart_buttons()
Renders express payment buttons in the mini-cart widget.
public
render_mini_cart_buttons() : mixed
render_product_buttons()
Renders express payment buttons on the product page.
public
render_product_buttons() : mixed
setup_cart_button_position()
Sets up the cart button position from the filter and registers the cart hook.
private
setup_cart_button_position() : mixed
Must run on init so filters from themes/plugins are applied first.
setup_product_button_position()
Determines product button position from product meta and registers the appropriate hook.
private
setup_product_button_position() : mixed
Runs on woocommerce_before_add_to_cart_form so the global $product is available.