fix(wa): usar language_code real de la plantilla (es, no es_CO)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-03 10:32:15 -05:00
co-authored by Claude Sonnet 4.6
parent 61c8c0b9ca
commit 7a56ec25a0
2 changed files with 8 additions and 4 deletions
+3 -2
View File
@@ -175,8 +175,9 @@ if (isset($_GET['test_cel'])) {
echo "5. TEST DE ENVÍO\n";
echo "─────────────────\n";
$testCel = trim($_GET['test_cel']);
$testTpl = $cfg['turnero_wa_template'] ?? 'consentimiento_turno';
$testLang = $cfg['turnero_wa_lang'] ?? 'es_CO';
$testTpl = $cfg['turnero_wa_template'] ?? 'consentimiento_turno';
// Usar el idioma real de la plantilla aprobada en Meta
$testLang = $tplRow['language_code'] ?? ($cfg['turnero_wa_lang'] ?? 'es');
require_once __DIR__ . '/services/WhatsAppService.php';
$baseUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'];