<?php
/**
 * Plugin uninstall handler
 *
 * @package PackshotPhotoAI
 */

// If uninstall not called from WordPress, exit
if (!defined('WP_UNINSTALL_PLUGIN')) {
    exit;
}

// Delete all options and transients matching packshotphoto_ prefix
global $wpdb;
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
$wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE 'packshotphoto_%' OR option_name LIKE '_transient_packshotphoto_%' OR option_name LIKE '_transient_timeout_packshotphoto_%'");

