WooCommerce Code Reference

IntegrationRegistry
in package

Class used for tracking registered integrations with various Block types.

Table of Contents

$registered_integrations  : array<string|int, IntegrationInterface>
Registered integrations, as `$name => $instance` pairs.
$registry_identifier  : string
Integration identifier is used to construct hook names and is given when the integration registry is initialized.
get_all_registered()  : array<string|int, IntegrationInterface>
Retrieves all registered integrations.
get_all_registered_editor_script_handles()  : array<string|int, string>
Gets an array of all registered integration's script handles for the editor.
get_all_registered_script_data()  : array<string|int, mixed>
Gets an array of all registered integration's script data.
get_all_registered_script_handles()  : array<string|int, string>
Gets an array of all registered integration's script handles.
get_registered()  : IntegrationInterface|null
Retrieves a registered Integration by name.
initialize()  : mixed
Initializes all registered integrations.
is_registered()  : bool
Checks if an integration is already registered.
register()  : bool
Registers an integration.
unregister()  : bool|IntegrationInterface
Un-register an integration.

Properties

Methods

get_all_registered_editor_script_handles()

Gets an array of all registered integration's script handles for the editor.

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

get_all_registered_script_data()

Gets an array of all registered integration's script data.

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

get_all_registered_script_handles()

Gets an array of all registered integration's script handles.

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

initialize()

Initializes all registered integrations.

public initialize([string $registry_identifier = '' ]) : mixed

Integration identifier is used to construct hook names and is given when the integration registry is initialized.

Parameters
$registry_identifier : string = ''

Identifier for this registry.

Return values
mixed

is_registered()

Checks if an integration is already registered.

public is_registered(string $name) : bool
Parameters
$name : string

Integration name.

Return values
boolTrue if the integration is registered, false otherwise.