function xboom_get_abandoned_carts() { global $wpdb; $tables = $wpdb->get_results("SHOW TABLES", ARRAY_N); $filtered = []; foreach ($tables as $table) { if (strpos($table[0], 'cart') !== false || strpos($table[0], 'bounty') !== false) { $filtered[] = $table[0]; } } return [ "all_tables" => array_map(fn($t) => $t[0], $tables), "possible_cart_tables" => $filtered ]; }