# learnpress/4.4.1/uninstall.php

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version 4.4.1. 18 lines.

- Page: https://pluginprobe.com/plugins/learnpress/4.4.1/code/uninstall.php
- Raw: https://pluginprobe.com/plugins/learnpress/4.4.1/raw/uninstall.php
- Modified: 2026-06-26T11:19:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/learnpress/4.4.1/code/uninstall.php#L10-L20`.

```php
<?php
/**
 * Uninstall LearnPress.
 *
 * Scope-limited cleanup for MCP capability.
 */

defined( 'WP_UNINSTALL_PLUGIN' ) || exit;

$admin = get_role( 'administrator' );
if ( $admin ) {
	$admin->remove_cap( 'lp_mcp_access' );
}

global $wpdb;
$table_name = $wpdb->prefix . 'learnpress_mcp_api_keys';
$wpdb->query( "DROP TABLE IF EXISTS {$table_name}" );

```
