BNPLMessageController
in package

Handles BNPL messaging across all page contexts (product, cart, checkout, shop).

Queries the PaymentGatewayRegistry for gateways that support 'stripe_bnpl_msg', checks each gateway's payment_sections setting to determine if messaging is enabled for the current page, then renders DOM containers and enqueues scripts.

Tags
since
4.0.0

Table of Contents

Properties

$context  : ContextHandler
$payment_registry  : PaymentGatewayRegistry
$supported_gateways  : array<string|int, WC_Payment_Gateway_Stripe_Local_Payment>|null
Cached array of gateways that support BNPL messaging for the current context.

Methods

__construct()  : mixed
add_script_data()  : void
Add script data that's used by the BNPL integration to render messaging on the frontend.
add_shop_script_data()  : mixed
enqueue_scripts()  : mixed
get_payment_gateway_icon()  : string
get_supported_countries()  : mixed
get_supported_currencies()  : mixed
get_supported_gateways()  : array<string|int, WC_Payment_Gateway_Stripe_Local_Payment>
Returns gateways that support BNPL messaging and have it enabled for the current page context.
initialize()  : mixed
render_cart_below_checkout_button()  : mixed
render_cart_below_total()  : mixed
render_checkout_below_total()  : mixed
render_product_above_price()  : mixed
render_product_below_add_to_cart()  : mixed
render_product_below_price()  : mixed
render_shop_after_button()  : mixed
render_shop_below_price()  : mixed
get_location()  : string
Returns a BNPL location setting from Advanced Settings.
render_cart_location()  : mixed
render_product_location()  : mixed
render_shop_location()  : mixed

Properties

Methods

get_location()

Returns a BNPL location setting from Advanced Settings.

private get_location(string $option_key, string $default) : string
Parameters
$option_key : string

The advanced setting key (e.g., 'bnpl_product_location')

$default : string

Default value if not set

Return values
string

        
On this page

Search results