add_filter('the_posts', function(array $posts, WP_Query $q){
if (is_admin() || !$q->is_main_query()) return $posts;
if (!(function_exists('is_shop') && (is_shop() || is_product_taxonomy()))) return $posts;
// если активна фильтрация FE — показываем всё
if (function_exists('flrt_is_filter_request') && flrt_is_filter_request()) return $posts;
$kept = [];
$seen = [];
foreach ($posts as $p) {
if (get_post_type($p) !== 'product') { $kept[] = $p; continue; }
$pid = (int)$p->ID;
// Получаем список связанной группы из WPC LV
$groupIds = [$pid];
if (class_exists('WPCleverWpclv')) {
$link = WPCleverWpclv::get_linked_data($pid);
if ($link && !empty($link['products'])) {
$groupIds = array_map('intval', array_filter(explode(',', $link['products'])));
if (!in_array($pid, $groupIds, true)) $groupIds[] = $pid;
}
}
sort($groupIds, SORT_NUMERIC);
$groupKey = implode('-', $groupIds);
$canonical = (int)min($groupIds);
if (!isset($seen[$groupKey])) $seen[$groupKey] = $canonical;
if ($pid === $seen[$groupKey]) {
$kept[] = $p;
}
}
return $kept;
}, 20, 2);
flrt_is_filter_request();
Вы же должны знать как работают базы геоIP.. это реально не всегда зависит от хостера))
Ну смените сервак на хетзнер или IP.. это ж не долго
$datecreate = '001716212585';
$dateexpire = '001752212585';