​​​​✅ Notificações automáticas com WhatsApp para agendamentos no WordPress grátis

📁 Arquivos disponíveis para download nessa aula​


​👉 ​INSTRUÇÕES BÁSICAS VÍDEO 1:

AGENDAMENTO DE COMPROMISSOS E ENVIO DE NOTIFICAÇÕES VIA WHATSAPP

WORDPRESS

1- DOWNLOAD GIT, NODE 14, ARC e NGROK

2- ABRIR GIT CMD

a. cd Desktop

b. mkdir botzdgwp

c. cd botzdgwp

d. criar package.json, app.js, index.html, check.svg e icon.svg

e. npm install

f. node app.js

g. testar local

h. expor o serviço via ngrok

3- INSTALAR WP AMELIA

a. adicionar configurações de empresa

b. adicionar configurações de notificação

c. adicionar funcionário

d. adicionar serviço

e. configurar notificações

f. criar página com calendário

g. injetar função no ameliabooking/src/Application/Services/Notification/EmailNotificationService.php

h. explicações sobre o hook

4- AGENDAR TESTE


​$phoneUser = $user['phone'];

$zdgPhone = preg_replace("/[^0-9]/", "", $phoneUser);

$zdgBody = $reParsedData['body'];

$order = "\n";

$replace = '<br>';

$newstr = str_replace($replace, $order, $zdgBody);

$order2 = "*";

$replace2 = '<strong>';

$newstr2 = str_replace($replace2, $order2, $newstr);

$order3 = "*";

$replace3 = '</strong>';

$newstr3 = str_replace($replace3, $order3, $newstr2);

$order4 = "";

$replace4 = '<p>';

$newstr4 = str_replace($replace4, $order4, $newstr3);

$order5  = "";

$replace5 = '</p>';

$newstr5 = str_replace($replace5, $order5, $newstr4);

$url = 'https://newapi.zapdasgalaxias.com.br/send-message';

$data = array('number' => $zdgPhone, 'message' => $newstr5);

$options = array(

'http' => array(

'header'  => "Content-type: application/x-www-form-urlencoded\r\n",

'method'  => 'POST',

'content' => http_build_query($data)

)

);

$context  = stream_context_create($options);

$result = file_get_contents($url, false, $context);

if ($result === FALSE) { /* Handle error */ }