WooCommerce Code Reference

AbstractPaymentMethodType
in package
implements PaymentMethodTypeInterface

AbstractPaymentMethodType class.

Tags
since
2.6.0

Interfaces, Classes and Traits

PaymentMethodTypeInterface
Integration.Interface

Table of Contents

$name  : string
Payment method name defined by payment methods extending this class.
$settings  : array<string|int, mixed>
Settings from the WP options table
get_editor_script_handles()  : array<string|int, string>
Returns an array of script handles to enqueue in the admin context.
get_name()  : mixed
Returns the name of the payment method.
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>
Returns an array of supported features.
is_active()  : bool
Returns if this payment method should be active. If false, the scripts will not be enqueued.
get_setting()  : mixed
Get a setting from the settings array if set.

Properties

Methods

get_editor_script_handles()

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

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

Alias of get_payment_method_script_handles_for_admin. Defined by IntegrationInterface.

Return values
array<string|int, string>

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>

Alias of get_payment_method_data. Defined by IntegrationInterface.

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>

Alias of get_payment_method_script_handles. Defined by IntegrationInterface.

Return values
array<string|int, string>

get_setting()

Get a setting from the settings array if set.

protected get_setting(string $name[, mixed $default = '' ]) : mixed
Parameters
$name : string

Setting name.

$default : mixed = ''

Value that is returned if the setting does not exist.

Return values
mixed