Automattic\WooCommerce\Internal\Admin\Settings

SettingsUIRequestContext::resolve_script_handles │ private │ WC 1.0

Resolve extension script handles.

Method of the class: SettingsUIRequestContext{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->resolve_script_handles(): void;

SettingsUIRequestContext::resolve_script_handles() code WC 11.1.2

private function resolve_script_handles(): void {
	$this->script_handles_resolved = true;
	$this->script_handles          = array();

	if ( ! $this->settings_ui_page ) {
		return;
	}

	try {
		$this->script_handles = self::filter_script_handles( $this->settings_ui_page->get_script_handles( $this->section ) );
	} catch ( \Throwable $e ) {
		$this->script_handles_failed = true;

		self::log_resolution_failure( 'Settings UI script handles', $this->get_page_id(), $this->section, $e, __METHOD__ );

		if ( $e instanceof \Exception ) {
			$this->script_handles_failure_reason = sprintf(
				/* translators: %s: exception message. */
				__( 'Settings UI script handles could not be resolved: %s', 'woocommerce' ),
				$e->getMessage()
			);
		}
	}
}