Automattic\WooCommerce\Blocks

DependencyDetection::initpublicWC 10.5.0

Initialize hooks.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$DependencyDetection = new DependencyDetection();
$DependencyDetection->init(): void;

Список изменений

С версии 10.5.0 Введена.

Код DependencyDetection::init() WC 11.0.1

public function init(): void {
	// Only run when debugging is enabled.
	if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) {
		return;
	}

	// Output an early inline script to set up the Proxy before any other scripts run.
	add_action( 'wp_head', array( $this, 'output_early_proxy_setup' ), 1 );
	add_action( 'admin_head', array( $this, 'output_early_proxy_setup' ), 1 );

	// Output registry late when all scripts (including IntegrationInterface) are registered.
	add_action( 'wp_print_footer_scripts', array( $this, 'output_script_registry' ), 1 );
	add_action( 'admin_print_footer_scripts', array( $this, 'output_script_registry' ), 1 );
}