Automattic\WooCommerce\Admin\Features\Blueprint

Init::get_step_groups_for_js()publicWC 1.0

Return step groups for JS.

This is used to populate exportable items on the blueprint settings page.

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

Хуков нет.

Возвращает

Массив.

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

$Init = new Init();
$Init->get_step_groups_for_js();

Код Init::get_step_groups_for_js() WC 9.7.1

public function get_step_groups_for_js() {
		return array(
			array(
				'id'          => 'settings',
				'description' => __( 'It includes all the items featured in WooCommerce | Settings.', 'woocommerce' ),
				'label'       => __( 'Settings', 'woocommerce' ),
				'items'       => array_map(
					function ( $exporter ) {
						return array(
							'id'          => $exporter instanceof HasAlias ? $exporter->get_alias() : $exporter->get_step_name(),
							'label'       => $exporter->get_label(),
							'description' => $exporter->get_description(),
						);
					},
					$this->get_woo_exporters()
				),
			),
			array(
				'id'          => 'plugins',
				'description' => __( 'It includes all the installed plugins and extensions.', 'woocommerce' ),
				'label'       => __( 'Plugins and extensions', 'woocommerce' ),
				'items'       => array_map(
					function ( $key, $plugin ) {
						return array(
							'id'    => $key,
							'label' => $plugin['Name'],
						);
					},
					array_keys( $this->wp_get_plugins() ),
					$this->wp_get_plugins()
				),
			),
			array(
				'id'          => 'themes',
				'description' => __( 'It includes all the installed themes.', 'woocommerce' ),
				'label'       => __( 'Themes', 'woocommerce' ),
				'items'       => array_map(
					function ( $key, $theme ) {
						return array(
							'id'    => $key,
							'label' => $theme['Name'],
						);
					},
					array_keys( $this->wp_get_themes() ),
					$this->wp_get_themes()
				),
			),
		);
}