get_route(), '/contact-form-7/') !== false) {\n $form_id = $request->get_param('_wpcf7');\n if ($form_id) {\n $form = wpcf7_contact_form($form_id);\n if ($form) {\n $tags = $form->scan_form_tags();\n foreach ($tags as $tag) {\n // Fill empty radio buttons with their default value so CF7 doesn't throw "An undefined value was submitted"\n if ($tag->type === 'radio' && empty($_POST[$tag->name]) && !empty($tag->values)) {\n $_POST[$tag->name] = ((array) $tag->values)[0];\n }\n }\n }\n }\n }\n return $result;\n}, 10, 3);\n\n// 2. Trigger n8n webhook\nadd_action('wpcf7_submit', 'jcp_trigger_n8n_webhook', 10, 2);\nadd_action('wpcf7_before_send_mail', 'jcp_trigger_n8n_webhook', 10, 2);\nadd_action('wpcf7_mail_sent', 'jcp_trigger_n8n_webhook', 10, 1);\n\nfunction jcp_trigger_n8n_webhook($form = null, $arg2 = null) {\n static $sent = [];\n if (!$form || !is_a($form, 'WPCF7_ContactForm') || isset($sent[$form->id()])) return;\n $sent[$form->id()] = true;\n\n $sub = WPCF7_Submission::get_instance();\n $data = $sub ? $sub->get_posted_data() : $_POST;\n $url = $sub ? $sub->get_meta('url') : (wp_get_referer() ?: home_url($_SERVER['REQUEST_URI']));\n $clean = [];\n\n // Чистимо дані від wpcf7 та масивів\n foreach ($data as $k => $v) {\n if (strpos($k, '_wpcf7') !== 0) $clean[$k] = is_array($v) ? implode(', ', $v) : $v;\n }\n\n // Видалення полів з неактивних гілок (Regex-оптимізація)\n $html = $form->prop('form');\n $branch = 'br-0';\n if (preg_match('/data-step-type=["\']splitter["\'].*?\[radio\s+([^\s\]]+)\s+.*?("(?:[^"\\\\]|\\\\.)*"(?:\s+"(?:[^"\\\\]|\\\\.)*")*)/is', $html, $m)) {\n preg_match_all('/"((?:[^"\\\\]|\\\\.)*)"/', $m[2], $opts);\n if (isset($clean[$m[1]]) && ($idx = array_search($clean[$m[1]], $opts[1] ?? [])) !== false) {\n $branch = 'br-' . $idx;\n }\n }\n\n if (preg_match_all('/class=[\"\'][^\"\']*?branch-group\s+(br-\d+)[^\"\']*?[\"\'](.*?)?(?= $br) {\n if ($br !== $branch && preg_match_all('/\[(?:text|email|tel|url|textarea|select|radio|checkbox)\*?\s+([^\s\]]+)/i', $matches[2][$i], $tags)) {\n foreach ($tags[1] as $t) { unset($clean[$t]); }\n }\n }\n }\n\n $labels = [];\n if (preg_match_all('/]*class=["\'][^"\']*yur-quiz-label[^"\']*["\'][^>]*>(.*?)<\/span>.*?\[(?:text|email|tel|url|textarea|select|radio|checkbox)\*?\s+([^\s\]]+)/is', $html, $m)) {\n $labels = array_combine($m[2], array_map('trim', array_map('strip_tags', $m[1])));\n }\n\n $final_payload = [\n 'user_city' => isset($clean['user-city']) ? $clean['user-city'] : (isset($clean['city']) ? $clean['city'] : ''),\n 'your_phone' => isset($clean['your-phone']) ? $clean['your-phone'] : (isset($clean['phone']) ? $clean['phone'] : ''),\n 'source_url' => $url,\n 'form_id' => $form->id(),\n 'form_title' => $form->title(),\n 'answers' => []\n ];\n\n $exclude = ['user-city', 'city', 'your-phone', 'phone'];\n foreach ($clean as $k => $v) {\n if (!in_array($k, $exclude) && $k !== 'source_url' && $k !== 'form_id' && $k !== 'form_title') {\n $question = isset($labels[$k]) ? $labels[$k] : $k;\n // Decode HTML entities in case there are quotes or amps in the label\n $question = html_entity_decode($question, ENT_QUOTES | ENT_XML1, 'UTF-8');\n $final_payload['answers'][$question] = $v;\n }\n }\n\n $final_payload['utm_source'] = isset($_COOKIE['utm_source']) ? sanitize_text_field($_COOKIE['utm_source']) : ''; $final_payload['utm_medium'] = isset($_COOKIE['utm_medium']) ? sanitize_text_field($_COOKIE['utm_medium']) : ''; $final_payload['utm_campaign'] = isset($_COOKIE['utm_campaign']) ? sanitize_text_field($_COOKIE['utm_campaign']) : ''; $final_payload['utm_term'] = isset($_COOKIE['utm_term']) ? sanitize_text_field($_COOKIE['utm_term']) : ''; $final_payload['utm_content'] = isset($_COOKIE['utm_content']) ? sanitize_text_field($_COOKIE['utm_content']) : ''; $final_payload['gclid'] = isset($_COOKIE['gclid']) ? sanitize_text_field($_COOKIE['gclid']) : ''; \n $bbcode = [];\n foreach ($final_payload['answers'] as $q => $a) {\n $bbcode[] = "[b]" . $q . "[/b]\n" . $a;\n }\n $final_payload['answers_bbcode'] = implode("\n\n", $bbcode);\n\n $res = wp_remote_post('https://n8n.jurconsult.click/webhook/contact-form-from-jurconsult', [\n 'body' => json_encode($final_payload),\n 'headers' => ['Content-Type' => 'application/json'],\n 'timeout' => 5,\n 'blocking' => true, // changed to true for debugging\n 'sslverify' => false\n ]);\n\n update_option('jcp_last_n8n_webhook_log', [\n 'time' => current_time('mysql'),\n 'form_id' => $form->id(),\n 'payload' => $final_payload,\n 'code' => is_wp_error($res) ? $res->get_error_message() : wp_remote_retrieve_response_code($res)\n ]);\n}{"id":101555,"date":"2026-05-07T08:32:23","date_gmt":"2026-05-07T05:32:23","guid":{"rendered":"https:\/\/jurconsult.pro\/bez-kategoryy\/otsrochka-ispolneniya-postanovleniya-ob-administrativnom-vzyskanii-kak-poluchit-pauzu-na-mesyats\/"},"modified":"2026-08-28T18:46:29","modified_gmt":"2026-08-28T15:46:29","slug":"otsrochka-ispolneniya-postanovleniya-ob-administrativnom-vzyskanii-kak-poluchit-pauzu-na-mesyats","status":"publish","type":"post","link":"https:\/\/jurconsult.pro\/ru\/administrativnoe-pravo\/otsrochka-ispolneniya-postanovleniya-ob-administrativnom-vzyskanii-kak-poluchit-pauzu-na-mesyats\/","title":{"rendered":"\u041e\u0442\u0441\u0440\u043e\u0447\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0432\u0437\u044b\u0441\u043a\u0430\u043d\u0438\u0438: \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0430\u0443\u0437\u0443 \u043d\u0430 \u043c\u0435\u0441\u044f\u0446"},"content":{"rendered":"

\u041e\u0442\u0441\u0440\u043e\u0447\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0432\u0437\u044b\u0441\u043a\u0430\u043d\u0438\u0438 \u2014 \u044d\u0442\u043e \u0437\u0430\u043a\u043e\u043d\u043d\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0441\u0440\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0440\u043e\u043a \u0434\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u044f\u0446\u0430, \u0435\u0441\u043b\u0438 \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430\u043c. \u0422\u0430\u043a\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u043f\u0430\u0443\u0437\u0443 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043d\u0430 \u0448\u0442\u0440\u0430\u0444 \u0438\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u0431\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0430\u0440\u0435\u0441\u0442\u0430.<\/p>\n

\u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u0442\u0441\u0440\u043e\u0447\u043a\u0430 \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0430\u043c\u043e \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442 \u0434\u0430\u0442\u0443 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0443\u0434\u0432\u043e\u0435\u043d\u0438\u044f \u0448\u0442\u0440\u0430\u0444\u0430 \u0432 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u043b\u0443\u0436\u0431\u0435 \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0445 \u0441\u0447\u0435\u0442\u043e\u0432 \u0438\u0437-\u0437\u0430 \u043d\u0435\u0441\u0432\u043e\u0435\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u044b.<\/p>\n

\n

\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u0431 \u043e\u0442\u0441\u0440\u043e\u0447\u043a\u0435 \u043f\u043e \u0441\u0442\u0430\u0442\u044c\u0435 301 \u041a\u0423\u043f\u0410\u041f<\/h3>\n