<?php
/**
 * Uninstall script for PC Membership Plugin.
 * Removes custom tables created by the plugin.
 */
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
    exit; // Prevent direct access.
}
global $wpdb;
$tables = array(
    $wpdb->prefix . 'pc_membership_plans',
    $wpdb->prefix . 'pc_membership_subscriptions',
);
foreach ( $tables as $table ) {
    $wpdb->query( "DROP TABLE IF EXISTS `$table`" );
}
// Option cleanup.
delete_option( 'pc_membership_options' );
?>