Automattic\WooCommerce\Blocks
DependencyDetection::init
Initialize hooks.
Method of the class: DependencyDetection{}
No Hooks.
Returns
null. Nothing (null).
Usage
$DependencyDetection = new DependencyDetection(); $DependencyDetection->init(): void;
Changelog
| Since 10.5.0 | Introduced. |
DependencyDetection::init() DependencyDetection::init code WC 10.7.0
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 );
}