Automattic\WooCommerce\Internal\MCP

McpEndpointRemoval::handle_admin_enqueue_scripts │ public │ WC 1.0

Handle the admin_enqueue_scripts hook.

Loads the core scripts that open the MCP Adapter plugin details in a modal, only when the notice shows the install link.

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

Хуков нет.

Возвращает

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

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

$McpEndpointRemoval = new McpEndpointRemoval();
$McpEndpointRemoval->handle_admin_enqueue_scripts(): void;

Код McpEndpointRemoval::handle_admin_enqueue_scripts() WC 11.3.0

public function handle_admin_enqueue_scripts(): void {
	if ( ! $this->should_show_removed_notice() || 'install' !== $this->get_adapter_link_type() ) {
		return;
	}

	add_thickbox();
	wp_enqueue_script( 'plugin-install' );
}