Automattic\WooCommerce\Blocks\Integrations

IntegrationRegistry::get_all_registered_script_data()publicWC 1.0

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

Метод класса: IntegrationRegistry{}

Хуков нет.

Возвращает

Массив.

Использование

$IntegrationRegistry = new IntegrationRegistry();
$IntegrationRegistry->get_all_registered_script_data();

Код IntegrationRegistry::get_all_registered_script_data() WC 7.1.0

public function get_all_registered_script_data() {
	$script_data             = [];
	$registered_integrations = $this->get_all_registered();

	foreach ( $registered_integrations as $registered_integration ) {
		$script_data[ $registered_integration->get_name() . '_data' ] = $registered_integration->get_script_data();
	}

	return array_filter( $script_data );
}