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.

Method of the class: McpEndpointRemoval{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

McpEndpointRemoval::handle_admin_enqueue_scripts() code 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' );
}