WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Admin

Loader::inject_wc_settings_dependencies() public WC 1.0

Injects wp-shared-settings as a dependency if it's present.

{} It's a method of the class: Loader{}

No Hooks.

Return

null. Nothing.

Usage

$result = Loader::inject_wc_settings_dependencies();

Code of Loader::inject_wc_settings_dependencies() WC 5.8.0

public static function inject_wc_settings_dependencies() {
	if ( wp_script_is( 'wc-settings', 'registered' ) ) {
		$handles_for_injection = [
			'wc-csv',
			'wc-currency',
			'wc-customer-effort-score',
			'wc-navigation',
			// NOTE: This should be removed when Gutenberg is updated and
			// the notices package is removed from WooCommerce Admin.
			'wc-notices',
			'wc-number',
			'wc-date',
			'wc-components',
			'wc-tracks',
		];
		foreach ( $handles_for_injection as $handle ) {
			$script = wp_scripts()->query( $handle, 'registered' );
			if ( $script instanceof _WP_Dependency ) {
				$script->deps[] = 'wc-settings';
			}
		}
	}
}