WooCommerce Code Reference

PaymentMethodTypeInterface extends IntegrationInterface

Integration.Interface

Integrations must use this interface when registering themselves with blocks,

Table of Contents

get_editor_script_handles()  : array<string|int, string>
Returns an array of script handles to enqueue in the editor context.
get_name()  : string
The name of the integration.
get_payment_method_data()  : array<string|int, mixed>
An array of key, value pairs of data made available to payment methods client side.
get_payment_method_script_handles()  : array<string|int, string>
Returns an array of script handles to enqueue for this payment method in the frontend context
get_payment_method_script_handles_for_admin()  : array<string|int, string>
Returns an array of script handles to enqueue for this payment method in the admin context
get_script_data()  : array<string|int, mixed>
An array of key, value pairs of data made available to the block on the client side.
get_script_handles()  : array<string|int, string>
Returns an array of script handles to enqueue in the frontend context.
get_supported_features()  : array<string|int, string>
Get array of supported features.
initialize()  : mixed
When called invokes any initialization/setup for the integration.
is_active()  : bool
Returns if this payment method should be active. If false, the scripts will not be enqueued.

Methods

get_editor_script_handles()

Returns an array of script handles to enqueue in the editor context.

public get_editor_script_handles() : array<string|int, string>
Return values
array<string|int, string>

get_payment_method_data()

An array of key, value pairs of data made available to payment methods client side.

public get_payment_method_data() : array<string|int, mixed>
Return values
array<string|int, mixed>

get_payment_method_script_handles()

Returns an array of script handles to enqueue for this payment method in the frontend context

public get_payment_method_script_handles() : array<string|int, string>
Return values
array<string|int, string>

get_payment_method_script_handles_for_admin()

Returns an array of script handles to enqueue for this payment method in the admin context

public get_payment_method_script_handles_for_admin() : array<string|int, string>
Return values
array<string|int, string>

get_script_data()

An array of key, value pairs of data made available to the block on the client side.

public get_script_data() : array<string|int, mixed>
Return values
array<string|int, mixed>

get_script_handles()

Returns an array of script handles to enqueue in the frontend context.

public get_script_handles() : array<string|int, string>
Return values
array<string|int, string>