query( $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s OR option_name LIKE %s", '_transient_agentshop_%', '_transient_timeout_agentshop_%' ) ); // Remove webhooks. if ( class_exists( 'WC_Data_Store' ) ) { $agentshop_data_store = WC_Data_Store::load( 'webhook' ); $agentshop_webhook_ids = $agentshop_data_store->get_webhooks_ids(); foreach ( $agentshop_webhook_ids as $agentshop_webhook_id ) { $agentshop_webhook = wc_get_webhook( $agentshop_webhook_id ); if ( $agentshop_webhook && strpos( $agentshop_webhook->get_name(), 'AgentShop - ' ) === 0 ) { $agentshop_webhook->delete( true ); } } } // Clear scheduled cron events. wp_clear_scheduled_hook( 'agentshop_daily_sync' ); wp_clear_scheduled_hook( 'agentshop_cleanup_transients' ); // Flush rewrite rules to remove llms.txt routes. flush_rewrite_rules(); // Note: We do NOT delete order meta (_agentshop_tracked) as it's useful for historical reference. // Store owners can manually clean this up if needed.