[{"data":1,"prerenderedAt":1744},["ShallowReactive",2],{"docs-pages-meta":3,"i-lucide:menu":142,"i-fa6-solid:book":147,"i-fa6-solid:signs-post":151,"i-lucide:search":153,"i-lucide:languages":155,"i-lucide:chevron-down":157,"i-lucide:moon":159,"i-fa6-solid:rocket":161,"i-lucide:sparkles":163,"i-lucide:badge-check":165,"i-lucide:star":167,"i-fa6-solid:qrcode":169,"i-fa6-solid:cube":171,"i-lucide:webhook":173,"i-fa6-brands:wordpress":175,"i-fa6-solid:envelope":177,"i-fa6-solid:code":179,"i-fa6-solid:key":182,"docs-page:\u002Fen\u002Fhooks-and-development":184,"i-lucide:copy":1738,"i-lucide:chevron-left":1740,"i-lucide:chevron-right":1742},[4,9,14,19,22,27,30,35,38,42,47,52,56,61,66,71,76,79,83,87,90,93,97,100,104,107,111,115,119,123,127,131,135,139],{"path":5,"title":6,"description":7,"icon":8},"\u002Fen\u002Fapi-reference\u002Fv2\u002Fauthentication","Authentication","Learn how to generate and manage your access credentials to use the API securely.","key",{"path":10,"title":11,"description":12,"icon":13},"\u002Fen\u002Fapi-reference\u002Fv2","Introduction","The v2 API: connections, chats, messages and templates.","sparkles",{"path":15,"title":16,"description":17,"icon":18},"\u002Fen\u002Fapi-reference\u002Fv2\u002Fwebhooks","Webhooks","In this section, you’ll learn how to integrate and use webhooks and messaging events to connect your application to your projects.","webhook",{"path":20,"title":6,"description":21,"icon":8},"\u002Fen\u002Fapi-reference\u002Fv3\u002Fauthentication","How a v3 request proves who it is, and which workspace it acts on.",{"path":23,"title":24,"description":25,"icon":26},"\u002Fen\u002Fapi-reference\u002Fv3\u002Fconventions","Conventions","Pagination, errors, ids and dates — the rules every v3 endpoint follows.","list-check",{"path":28,"title":11,"description":29,"icon":13},"\u002Fen\u002Fapi-reference\u002Fv3","The v3 API: workspaces, connections, campaigns and the helpdesk.",{"path":31,"title":32,"description":33,"icon":34},"\u002Fen\u002Fapi-reference\u002Fv3\u002Frealtime","Realtime","The websocket behind the shared inbox: live conversations, typing and presence.","tower-broadcast",{"path":36,"title":16,"description":37,"icon":18},"\u002Fen\u002Fapi-reference\u002Fv3\u002Fwebhooks","Receive WhatsApp and helpdesk events on your own server, and prove they came from us.",{"path":39,"title":40,"description":41,"icon":8},"\u002Fen\u002Fapikeys","API Keys","Understand what API Keys are and why they are required to use Pingo Notify securely.",{"path":43,"title":44,"description":45,"icon":46},"\u002Fen\u002Fconnections","Connections","Connections represent WhatsApp sessions linked to Pingo Notify, used for sending, receiving, and integrations.","qrcode",{"path":48,"title":49,"description":50,"icon":51},"\u002Fen\u002Fhooks-and-development","Hooks and Development","Extend the Pingo Notify WordPress plugin with custom triggers, groups, and hooks.","code",{"path":53,"title":54,"description":55,"icon":13},"\u002Fen","Introduction to Pingo Notify","Connect WhatsApp to your systems, automate workflows, and send messages.",{"path":57,"title":58,"description":59,"icon":60},"\u002Fen\u002Fintegrations","Integrations","Integrations represent external applications linked to Pingo Notify, authorized to access resources such as connections, plans, and messaging.","cube",{"path":62,"title":63,"description":64,"icon":65},"\u002Fen\u002Fofficial-whatsapp-api","Official WhatsApp API","Step-by-step guide to request access to the Official WhatsApp Business API and connect it to Pingo Notify.","badge-check",{"path":67,"title":68,"description":69,"icon":70},"\u002Fen\u002Fplugin-wordpress","Get started","WordPress plugin that connects events from your site to Pingo Notify for automatic notification delivery.","wordpress",{"path":72,"title":73,"description":74,"icon":75},"\u002Fen\u002Ftemplate-plugins","Templates Guide","Learn how to create custom dynamic messages.","square-envelope",{"path":77,"title":16,"description":78,"icon":18},"\u002Fen\u002Fwebhooks","Receive WhatsApp events in real time by linking webhooks to one or more connections in Pingo Notify.",{"path":80,"title":81,"description":82,"icon":8},"\u002Fpt-BR\u002Fapi-reference\u002Fv2\u002Fauthentication","Autenticação","Veja como gerar e gerenciar suas credenciais de acesso para utilizar a API com segurança.",{"path":84,"title":85,"description":86,"icon":13},"\u002Fpt-BR\u002Fapi-reference\u002Fv2","Introdução","A API v2: conexões, conversas, mensagens e templates.",{"path":88,"title":16,"description":89,"icon":18},"\u002Fpt-BR\u002Fapi-reference\u002Fv2\u002Fwebhooks","Nesta seção, você aprende como integrar e utilizar webhooks e eventos de mensageria para conectar a aplicação aos seus projetos.",{"path":91,"title":81,"description":92,"icon":8},"\u002Fpt-BR\u002Fapi-reference\u002Fv3\u002Fauthentication","Como uma requisição v3 prova quem é, e em qual workspace ela atua.",{"path":94,"title":95,"description":96,"icon":26},"\u002Fpt-BR\u002Fapi-reference\u002Fv3\u002Fconventions","Convenções","Paginação, erros, ids e datas — as regras que todo endpoint da v3 segue.",{"path":98,"title":85,"description":99,"icon":13},"\u002Fpt-BR\u002Fapi-reference\u002Fv3","A API v3: workspaces, conexões, campanhas e o helpdesk.",{"path":101,"title":102,"description":103,"icon":34},"\u002Fpt-BR\u002Fapi-reference\u002Fv3\u002Frealtime","Tempo real","O websocket por trás da caixa compartilhada: conversas ao vivo, digitação e presença.",{"path":105,"title":16,"description":106,"icon":18},"\u002Fpt-BR\u002Fapi-reference\u002Fv3\u002Fwebhooks","Receba eventos do WhatsApp e do helpdesk no seu servidor, e prove que vieram de nós.",{"path":108,"title":109,"description":110,"icon":8},"\u002Fpt-BR\u002Fapikeys","Chaves de API","Entenda o que são Chaves de API e por que elas são necessárias para usar o Pingo Notify com segurança.",{"path":112,"title":113,"description":114,"icon":46},"\u002Fpt-BR\u002Fconnections","Conexões","Conexões representam sessões do WhatsApp vinculadas ao Pingo Notify, usadas para envio, recebimento e integrações.",{"path":116,"title":117,"description":118,"icon":51},"\u002Fpt-BR\u002Fhooks-and-development","Hooks e Desenvolvimento","Estenda o plugin WordPress do Pingo Notify com gatilhos, grupos e hooks personalizados.",{"path":120,"title":121,"description":122,"icon":13},"\u002Fpt-BR","Introdução ao Pingo Notify","Conecte o WhatsApp aos seus sistemas, automatize fluxos e envie mensagens.",{"path":124,"title":125,"description":126,"icon":60},"\u002Fpt-BR\u002Fintegrations","Integrações","Integrações representam aplicações externas vinculadas ao Pingo Notify, autorizadas a acessar recursos como conexões, planos e mensageria.",{"path":128,"title":129,"description":130,"icon":65},"\u002Fpt-BR\u002Fofficial-whatsapp-api","API Oficial do WhatsApp","Guia passo a passo para solicitar acesso à API Oficial do WhatsApp Business e conectá-la ao Pingo Notify.",{"path":132,"title":133,"description":134,"icon":70},"\u002Fpt-BR\u002Fplugin-wordpress","Primeiros passos","Plugin WordPress que conecta eventos do seu site ao Pingo Notify para envio automático de notificações.",{"path":136,"title":137,"description":138,"icon":75},"\u002Fpt-BR\u002Ftemplate-plugins","Guia de Templates","Aprenda a criar mensagens dinâmicas personalizadas.",{"path":140,"title":16,"description":141,"icon":18},"\u002Fpt-BR\u002Fwebhooks","Receba eventos do WhatsApp em tempo real vinculando webhooks a uma ou mais conexões no Pingo Notify.",{"left":143,"top":143,"width":144,"height":144,"rotate":143,"vFlip":145,"hFlip":145,"body":146},0,24,false,"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 5h16M4 12h16M4 19h16\"\u002F>",{"left":143,"top":143,"width":148,"height":149,"rotate":143,"vFlip":145,"hFlip":145,"body":150},448,512,"\u003Cpath fill=\"currentColor\" d=\"M96 0C43 0 0 43 0 96v320c0 53 43 96 96 96h320c17.7 0 32-14.3 32-32s-14.3-32-32-32v-64c17.7 0 32-14.3 32-32V32c0-17.7-14.3-32-32-32zm0 384h256v64H96c-17.7 0-32-14.3-32-32s14.3-32 32-32m32-240c0-8.8 7.2-16 16-16h192c8.8 0 16 7.2 16 16s-7.2 16-16 16H144c-8.8 0-16-7.2-16-16m16 48h192c8.8 0 16 7.2 16 16s-7.2 16-16 16H144c-8.8 0-16-7.2-16-16s7.2-16 16-16\"\u002F>",{"left":143,"top":143,"width":149,"height":149,"rotate":143,"vFlip":145,"hFlip":145,"body":152},"\u003Cpath fill=\"currentColor\" d=\"M224 32H64c-17.7 0-32 14.3-32 32v64c0 17.7 14.3 32 32 32h377.4c4.2 0 8.3-1.7 11.3-4.7l48-48c6.2-6.2 6.2-16.4 0-22.6l-48-48c-3-3-7.1-4.7-11.3-4.7H288c0-17.7-14.3-32-32-32s-32 14.3-32 32m256 224c0-17.7-14.3-32-32-32H288v-32h-64v32H70.6c-4.2 0-8.3 1.7-11.3 4.7l-48 48c-6.2 6.2-6.2 16.4 0 22.6l48 48c3 3 7.1 4.7 11.3 4.7H448c17.7 0 32-14.3 32-32zM288 480v-96h-64v96c0 17.7 14.3 32 32 32s32-14.3 32-32\"\u002F>",{"left":143,"top":143,"width":144,"height":144,"rotate":143,"vFlip":145,"hFlip":145,"body":154},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"m21 21l-4.34-4.34\"\u002F>\u003Ccircle cx=\"11\" cy=\"11\" r=\"8\"\u002F>\u003C\u002Fg>",{"left":143,"top":143,"width":144,"height":144,"rotate":143,"vFlip":145,"hFlip":145,"body":156},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m5 8l6 6m-7 0l6-6l2-3M2 5h12M7 2h1m14 20l-5-10l-5 10m2-4h6\"\u002F>",{"left":143,"top":143,"width":144,"height":144,"rotate":143,"vFlip":145,"hFlip":145,"body":158},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m6 9l6 6l6-6\"\u002F>",{"left":143,"top":143,"width":144,"height":144,"rotate":143,"vFlip":145,"hFlip":145,"body":160},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\"\u002F>",{"left":143,"top":143,"width":149,"height":149,"rotate":143,"vFlip":145,"hFlip":145,"body":162},"\u003Cpath fill=\"currentColor\" d=\"M156.6 384.9L125.7 354c-8.5-8.5-11.5-20.8-7.7-32.2c3-8.9 7-20.5 11.8-33.8H24c-8.6 0-16.6-4.6-20.9-12.1s-4.2-16.7.2-24.1l52.5-88.5c13-21.9 36.5-35.3 61.9-35.3H200c2.4-4 4.8-7.7 7.2-11.3C289.1-4.1 411.1-8.1 483.9 5.3c11.6 2.1 20.6 11.2 22.8 22.8c13.4 72.9 9.3 194.8-111.4 276.7c-3.5 2.4-7.3 4.8-11.3 7.2v82.3c0 25.4-13.4 49-35.3 61.9l-88.5 52.5c-7.4 4.4-16.6 4.5-24.1.2S224 496.7 224 488V380.8c-14.1 4.9-26.4 8.9-35.7 11.9c-11.2 3.6-23.4.5-31.8-7.8zM384 168a40 40 0 1 0 0-80a40 40 0 1 0 0 80\"\u002F>",{"left":143,"top":143,"width":144,"height":144,"rotate":143,"vFlip":145,"hFlip":145,"body":164},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594zM20 2v4m2-2h-4\"\u002F>\u003Ccircle cx=\"4\" cy=\"20\" r=\"2\"\u002F>\u003C\u002Fg>",{"left":143,"top":143,"width":144,"height":144,"rotate":143,"vFlip":145,"hFlip":145,"body":166},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M3.85 8.62a4 4 0 0 1 4.78-4.77a4 4 0 0 1 6.74 0a4 4 0 0 1 4.78 4.78a4 4 0 0 1 0 6.74a4 4 0 0 1-4.77 4.78a4 4 0 0 1-6.75 0a4 4 0 0 1-4.78-4.77a4 4 0 0 1 0-6.76\"\u002F>\u003Cpath d=\"m9 12l2 2l4-4\"\u002F>\u003C\u002Fg>",{"left":143,"top":143,"width":144,"height":144,"rotate":143,"vFlip":145,"hFlip":145,"body":168},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.12 2.12 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.12 2.12 0 0 0 1.597-1.16z\"\u002F>",{"left":143,"top":143,"width":148,"height":149,"rotate":143,"vFlip":145,"hFlip":145,"body":170},"\u003Cpath fill=\"currentColor\" d=\"M0 80c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48zm64 16v64h64V96zM0 336c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48zm64 16v64h64v-64zM304 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48h-96c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48m80 64h-64v64h64zM256 304c0-8.8 7.2-16 16-16h64c8.8 0 16 7.2 16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16v96c0 8.8-7.2 16-16 16h-64c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16v64c0 8.8-7.2 16-16 16h-32c-8.8 0-16-7.2-16-16zm112 176a16 16 0 1 1 0-32a16 16 0 1 1 0 32m64 0a16 16 0 1 1 0-32a16 16 0 1 1 0 32\"\u002F>",{"left":143,"top":143,"width":149,"height":149,"rotate":143,"vFlip":145,"hFlip":145,"body":172},"\u003Cpath fill=\"currentColor\" d=\"M234.5 5.7c13.9-5 29.1-5 43.1 0l192 68.6c25.4 9.1 42.4 33.2 42.4 60.3v242.9c0 27-17 51.2-42.5 60.3l-192 68.6c-13.9 5-29.1 5-43.1 0l-192-68.6C17 428.6 0 404.5 0 377.4V134.6c0-27 17-51.2 42.5-60.3zM256 66L82.3 128L256 190l173.7-62zm32 368.6l160-57.1v-188l-160 57.1z\"\u002F>",{"left":143,"top":143,"width":144,"height":144,"rotate":143,"vFlip":145,"hFlip":145,"body":174},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2\"\u002F>\u003Cpath d=\"m6 17l3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06\"\u002F>\u003Cpath d=\"m12 6l3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8\"\u002F>\u003C\u002Fg>",{"left":143,"top":143,"width":149,"height":149,"rotate":143,"vFlip":145,"hFlip":145,"body":176},"\u003Cpath fill=\"currentColor\" d=\"m61.7 169.4l101.5 278C92.2 413 43.3 340.2 43.3 256c0-30.9 6.6-60.1 18.4-86.6m337.9 75.9c0-26.3-9.4-44.5-17.5-58.7c-10.8-17.5-20.9-32.4-20.9-49.9c0-19.6 14.8-37.8 35.7-37.8c.9 0 1.8.1 2.8.2c-37.9-34.7-88.3-55.9-143.7-55.9c-74.3 0-139.7 38.1-177.8 95.9c5 .2 9.7.3 13.7.3c22.2 0 56.7-2.7 56.7-2.7c11.5-.7 12.8 16.2 1.4 17.5c0 0-11.5 1.3-24.3 2l77.5 230.4L249.8 247l-33.1-90.8c-11.5-.7-22.3-2-22.3-2c-11.5-.7-10.1-18.2 1.3-17.5c0 0 35.1 2.7 56 2.7c22.2 0 56.7-2.7 56.7-2.7c11.5-.7 12.8 16.2 1.4 17.5c0 0-11.5 1.3-24.3 2l76.9 228.7l21.2-70.9c9-29.4 16-50.5 16-68.7m-139.9 29.3l-63.8 185.5c19.1 5.6 39.2 8.7 60.1 8.7c24.8 0 48.5-4.3 70.6-12.1c-.6-.9-1.1-1.9-1.5-2.9zm183-120.7c.9 6.8 1.4 14 1.4 21.9c0 21.6-4 45.8-16.2 76.2l-65 187.9C426.2 403 468.7 334.5 468.7 256c0-37-9.4-71.8-26-102.1M504 256c0 136.8-111.3 248-248 248C119.2 504 8 392.7 8 256C8 119.2 119.2 8 256 8c136.7 0 248 111.2 248 248m-11.4 0c0-130.5-106.2-236.6-236.6-236.6C125.5 19.4 19.4 125.5 19.4 256S125.6 492.6 256 492.6c130.5 0 236.6-106.1 236.6-236.6\"\u002F>",{"left":143,"top":143,"width":149,"height":149,"rotate":143,"vFlip":145,"hFlip":145,"body":178},"\u003Cpath fill=\"currentColor\" d=\"M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4l217.6 163.2c11.4 8.5 27 8.5 38.4 0l217.6-163.2c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48zM0 176v208c0 35.3 28.7 64 64 64h384c35.3 0 64-28.7 64-64V176L294.4 339.2a63.9 63.9 0 0 1-76.8 0z\"\u002F>",{"left":143,"top":143,"width":180,"height":149,"rotate":143,"vFlip":145,"hFlip":145,"body":181},640,"\u003Cpath fill=\"currentColor\" d=\"M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6m80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3l89.3 89.4l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3\"\u002F>",{"left":143,"top":143,"width":149,"height":149,"rotate":143,"vFlip":145,"hFlip":145,"body":183},"\u003Cpath fill=\"currentColor\" d=\"M336 352c97.2 0 176-78.8 176-176S433.2 0 336 0S160 78.8 160 176c0 18.7 2.9 36.8 8.3 53.7L7 391c-4.5 4.5-7 10.6-7 17v80c0 13.3 10.7 24 24 24h80c13.3 0 24-10.7 24-24v-40h40c13.3 0 24-10.7 24-24v-40h40c6.4 0 12.5-2.5 17-7l33.3-33.3c16.9 5.4 35 8.3 53.7 8.3m40-256a40 40 0 1 1 0 80a40 40 0 1 1 0-80\"\u002F>",{"id":185,"title":49,"body":186,"description":50,"extension":1733,"hidden":145,"icon":51,"meta":1734,"navigation":254,"path":48,"seo":1735,"stem":1736,"__hash__":1737},"docs\u002Fen\u002Fhooks-and-development.md",{"type":187,"value":188,"toc":1717},"minimark",[189,193,196,209,212,217,224,227,479,481,485,492,573,575,579,586,591,598,661,665,679,683,710,1334,1336,1340,1343,1375,1378,1385,1389,1478,1482,1577,1581,1621,1623,1627,1657,1659,1663,1713],[190,191,192],"p",{},"This guide is for plugin developers who want to extend the Pingo Notify WordPress plugin.",[190,194,195],{},"You can use it to:",[197,198,199,203,206],"ul",{},[200,201,202],"li",{},"Create new triggers",[200,204,205],{},"Register your triggers in Pingo Notify",[200,207,208],{},"Modify existing triggers through public hooks",[210,211],"hr",{},[213,214,216],"h2",{"id":215},"register-custom-triggers","Register custom triggers",[190,218,219,220,223],{},"Use the ",[51,221,222],{},"infixs_pingo_notify_trigger_classes"," filter to register your trigger classes.",[190,225,226],{},"Load the registration after WordPress plugins are ready.",[228,229,234],"pre",{"className":230,"code":231,"language":232,"meta":233,"style":233},"language-php shiki shiki-themes github-light github-dark","\u003C?php\n\nnamespace Vendor\\MyPlugin\\Pingo;\n\ndefined( 'ABSPATH' ) || exit;\n\nuse Vendor\\MyPlugin\\Pingo\\Triggers\\MyOrderPaidTrigger;\n\nclass PingoNotifyExtension {\n    public function __construct() {\n        add_action( 'plugins_loaded', [ $this, 'boot' ] );\n    }\n\n    public function boot() {\n        add_filter( 'infixs_pingo_notify_trigger_classes', [ $this, 'registerTriggers' ] );\n    }\n\n    public function registerTriggers( $triggers ) {\n        $triggers[] = new MyOrderPaidTrigger();\n        return $triggers;\n    }\n}\n","php","",[51,235,236,249,256,270,275,299,304,315,320,332,347,373,379,384,396,418,423,428,441,459,468,473],{"__ignoreMap":233},[237,238,241,245],"span",{"class":239,"line":240},"line",1,[237,242,244],{"class":243},"szBVR","\u003C?",[237,246,248],{"class":247},"sj4cs","php\n",[237,250,252],{"class":239,"line":251},2,[237,253,255],{"emptyLinePlaceholder":254},true,"\n",[237,257,259,262,266],{"class":239,"line":258},3,[237,260,261],{"class":243},"namespace",[237,263,265],{"class":264},"sScJk"," Vendor\\MyPlugin\\Pingo",[237,267,269],{"class":268},"sVt8B",";\n",[237,271,273],{"class":239,"line":272},4,[237,274,255],{"emptyLinePlaceholder":254},[237,276,278,281,284,288,291,294,297],{"class":239,"line":277},5,[237,279,280],{"class":247},"defined",[237,282,283],{"class":268},"( ",[237,285,287],{"class":286},"sZZnC","'ABSPATH'",[237,289,290],{"class":268}," ) ",[237,292,293],{"class":243},"||",[237,295,296],{"class":243}," exit",[237,298,269],{"class":268},[237,300,302],{"class":239,"line":301},6,[237,303,255],{"emptyLinePlaceholder":254},[237,305,307,310,313],{"class":239,"line":306},7,[237,308,309],{"class":243},"use",[237,311,312],{"class":247}," Vendor\\MyPlugin\\Pingo\\Triggers\\MyOrderPaidTrigger",[237,314,269],{"class":268},[237,316,318],{"class":239,"line":317},8,[237,319,255],{"emptyLinePlaceholder":254},[237,321,323,326,329],{"class":239,"line":322},9,[237,324,325],{"class":243},"class",[237,327,328],{"class":264}," PingoNotifyExtension",[237,330,331],{"class":268}," {\n",[237,333,335,338,341,344],{"class":239,"line":334},10,[237,336,337],{"class":243},"    public",[237,339,340],{"class":243}," function",[237,342,343],{"class":247}," __construct",[237,345,346],{"class":268},"() {\n",[237,348,350,353,355,358,361,364,367,370],{"class":239,"line":349},11,[237,351,352],{"class":264},"        add_action",[237,354,283],{"class":268},[237,356,357],{"class":286},"'plugins_loaded'",[237,359,360],{"class":268},", [ ",[237,362,363],{"class":247},"$this",[237,365,366],{"class":268},", ",[237,368,369],{"class":286},"'boot'",[237,371,372],{"class":268}," ] );\n",[237,374,376],{"class":239,"line":375},12,[237,377,378],{"class":268},"    }\n",[237,380,382],{"class":239,"line":381},13,[237,383,255],{"emptyLinePlaceholder":254},[237,385,387,389,391,394],{"class":239,"line":386},14,[237,388,337],{"class":243},[237,390,340],{"class":243},[237,392,393],{"class":264}," boot",[237,395,346],{"class":268},[237,397,399,402,404,407,409,411,413,416],{"class":239,"line":398},15,[237,400,401],{"class":264},"        add_filter",[237,403,283],{"class":268},[237,405,406],{"class":286},"'infixs_pingo_notify_trigger_classes'",[237,408,360],{"class":268},[237,410,363],{"class":247},[237,412,366],{"class":268},[237,414,415],{"class":286},"'registerTriggers'",[237,417,372],{"class":268},[237,419,421],{"class":239,"line":420},16,[237,422,378],{"class":268},[237,424,426],{"class":239,"line":425},17,[237,427,255],{"emptyLinePlaceholder":254},[237,429,431,433,435,438],{"class":239,"line":430},18,[237,432,337],{"class":243},[237,434,340],{"class":243},[237,436,437],{"class":264}," registerTriggers",[237,439,440],{"class":268},"( $triggers ) {\n",[237,442,444,447,450,453,456],{"class":239,"line":443},19,[237,445,446],{"class":268},"        $triggers[] ",[237,448,449],{"class":243},"=",[237,451,452],{"class":243}," new",[237,454,455],{"class":247}," MyOrderPaidTrigger",[237,457,458],{"class":268},"();\n",[237,460,462,465],{"class":239,"line":461},20,[237,463,464],{"class":243},"        return",[237,466,467],{"class":268}," $triggers;\n",[237,469,471],{"class":239,"line":470},21,[237,472,378],{"class":268},[237,474,476],{"class":239,"line":475},22,[237,477,478],{"class":268},"}\n",[210,480],{},[213,482,484],{"id":483},"add-a-custom-trigger-group","Add a custom trigger group",[190,486,487,488,491],{},"If you want your triggers to appear under a dedicated category in the UI, use the ",[51,489,490],{},"infixs_pingo_notify_trigger_groups"," filter.",[228,493,495],{"className":230,"code":494,"language":232,"meta":233,"style":233},"add_filter( 'infixs_pingo_notify_trigger_groups', function ( $groups ) {\n    $groups[] = [\n        'id' => 'myplugin',\n        'name' => 'My Plugin',\n    ];\n\n    return $groups;\n} );\n",[51,496,497,515,525,539,551,556,560,568],{"__ignoreMap":233},[237,498,499,502,504,507,509,512],{"class":239,"line":240},[237,500,501],{"class":264},"add_filter",[237,503,283],{"class":268},[237,505,506],{"class":286},"'infixs_pingo_notify_trigger_groups'",[237,508,366],{"class":268},[237,510,511],{"class":243},"function",[237,513,514],{"class":268}," ( $groups ) {\n",[237,516,517,520,522],{"class":239,"line":251},[237,518,519],{"class":268},"    $groups[] ",[237,521,449],{"class":243},[237,523,524],{"class":268}," [\n",[237,526,527,530,533,536],{"class":239,"line":258},[237,528,529],{"class":286},"        'id'",[237,531,532],{"class":243}," =>",[237,534,535],{"class":286}," 'myplugin'",[237,537,538],{"class":268},",\n",[237,540,541,544,546,549],{"class":239,"line":272},[237,542,543],{"class":286},"        'name'",[237,545,532],{"class":243},[237,547,548],{"class":286}," 'My Plugin'",[237,550,538],{"class":268},[237,552,553],{"class":239,"line":277},[237,554,555],{"class":268},"    ];\n",[237,557,558],{"class":239,"line":301},[237,559,255],{"emptyLinePlaceholder":254},[237,561,562,565],{"class":239,"line":306},[237,563,564],{"class":243},"    return",[237,566,567],{"class":268}," $groups;\n",[237,569,570],{"class":239,"line":317},[237,571,572],{"class":268},"} );\n",[210,574],{},[213,576,578],{"id":577},"create-a-trigger-class","Create a trigger class",[190,580,581,582,585],{},"Create a class that extends ",[51,583,584],{},"Infixs\\PingoNotify\\Triggers\\Trigger",".",[587,588,590],"h3",{"id":589},"required-properties","Required properties",[190,592,593,594,597],{},"Set these properties in ",[51,595,596],{},"__construct()",":",[197,599,600,606,612,618,627,640,646,652],{},[200,601,602,605],{},[51,603,604],{},"$id",": unique trigger ID used by notifications",[200,607,608,611],{},[51,609,610],{},"$name",": label shown in the interface",[200,613,614,617],{},[51,615,616],{},"$description",": short description of the trigger",[200,619,620,623,624],{},[51,621,622],{},"$group_id",": group ID such as ",[51,625,626],{},"myplugin",[200,628,629,632,633,636,637],{},[51,630,631],{},"$type",": ",[51,634,635],{},"wp_action"," or ",[51,638,639],{},"wp_filter",[200,641,642,645],{},[51,643,644],{},"$hook",": WordPress hook name to listen to",[200,647,648,651],{},[51,649,650],{},"$hook_args",": number of hook arguments",[200,653,654,657,658],{},[51,655,656],{},"$hook_priority",": optional priority, default is ",[51,659,660],{},"10",[587,662,664],{"id":663},"required-methods","Required methods",[197,666,667,673],{},[200,668,669,672],{},[51,670,671],{},"transform(...$args)",": builds the payload sent to Pingo Notify",[200,674,675,678],{},[51,676,677],{},"placeholders()",": returns the available template variables",[587,680,682],{"id":681},"optional-methods","Optional methods",[197,684,685,690,695,700,705],{},[200,686,687],{},[51,688,689],{},"validate(...$args)",[200,691,692],{},[51,693,694],{},"formFields()",[200,696,697],{},[51,698,699],{},"examples()",[200,701,702],{},[51,703,704],{},"isAvailable()",[200,706,707],{},[51,708,709],{},"notificationsQueryBuilder(...$args)",[228,711,713],{"className":230,"code":712,"language":232,"meta":233,"style":233},"\u003C?php\n\nnamespace Vendor\\MyPlugin\\Pingo\\Triggers;\n\nuse Infixs\\PingoNotify\\Triggers\\Trigger;\n\ndefined( 'ABSPATH' ) || exit;\n\nclass MyOrderPaidTrigger extends Trigger {\n    public function __construct() {\n        $this->id = 'myplugin_order_paid';\n        $this->name = __( 'Order Paid', 'my-plugin' );\n        $this->description = __( 'Fires when an order is paid in My Plugin.', 'my-plugin' );\n        $this->group_id = 'myplugin';\n        $this->type = 'wp_action';\n        $this->hook = 'myplugin_order_paid';\n        $this->hook_args = 2;\n    }\n\n    protected function validate( ...$args ) {\n        $order_id = $args[0] ?? 0;\n        return ! empty( $order_id );\n    }\n\n    protected function transform( ...$args ) {\n        $order_id = $args[0] ?? 0;\n        $customer = $args[1] ?? [];\n\n        return [\n            'order' => [\n                'id' => (int) $order_id,\n            ],\n            'customer' => [\n                'name' => $customer['name'] ?? '',\n                'phone' => $customer['phone'] ?? '',\n            ],\n        ];\n    }\n\n    protected function placeholders() {\n        return [\n            [ 'path' => 'order.id', 'name' => 'Order ID', 'type' => 'number', 'description' => 'Order identifier' ],\n            [ 'path' => 'customer.name', 'name' => 'Customer Name', 'type' => 'string', 'description' => 'Customer full name' ],\n            [ 'path' => 'customer.phone', 'name' => 'Customer Phone', 'type' => 'string', 'description' => 'Customer phone number' ],\n        ];\n    }\n}\n",[51,714,715,721,725,734,738,747,751,767,771,785,795,813,840,864,879,895,910,926,930,934,952,976,989,994,998,1014,1033,1053,1058,1065,1075,1092,1098,1108,1131,1152,1157,1163,1168,1173,1185,1192,1238,1279,1319,1324,1329],{"__ignoreMap":233},[237,716,717,719],{"class":239,"line":240},[237,718,244],{"class":243},[237,720,248],{"class":247},[237,722,723],{"class":239,"line":251},[237,724,255],{"emptyLinePlaceholder":254},[237,726,727,729,732],{"class":239,"line":258},[237,728,261],{"class":243},[237,730,731],{"class":264}," Vendor\\MyPlugin\\Pingo\\Triggers",[237,733,269],{"class":268},[237,735,736],{"class":239,"line":272},[237,737,255],{"emptyLinePlaceholder":254},[237,739,740,742,745],{"class":239,"line":277},[237,741,309],{"class":243},[237,743,744],{"class":247}," Infixs\\PingoNotify\\Triggers\\Trigger",[237,746,269],{"class":268},[237,748,749],{"class":239,"line":301},[237,750,255],{"emptyLinePlaceholder":254},[237,752,753,755,757,759,761,763,765],{"class":239,"line":306},[237,754,280],{"class":247},[237,756,283],{"class":268},[237,758,287],{"class":286},[237,760,290],{"class":268},[237,762,293],{"class":243},[237,764,296],{"class":243},[237,766,269],{"class":268},[237,768,769],{"class":239,"line":317},[237,770,255],{"emptyLinePlaceholder":254},[237,772,773,775,777,780,783],{"class":239,"line":322},[237,774,325],{"class":243},[237,776,455],{"class":264},[237,778,779],{"class":243}," extends",[237,781,782],{"class":264}," Trigger",[237,784,331],{"class":268},[237,786,787,789,791,793],{"class":239,"line":334},[237,788,337],{"class":243},[237,790,340],{"class":243},[237,792,343],{"class":247},[237,794,346],{"class":268},[237,796,797,800,803,806,808,811],{"class":239,"line":349},[237,798,799],{"class":247},"        $this",[237,801,802],{"class":243},"->",[237,804,805],{"class":268},"id ",[237,807,449],{"class":243},[237,809,810],{"class":286}," 'myplugin_order_paid'",[237,812,269],{"class":268},[237,814,815,817,819,822,824,827,829,832,834,837],{"class":239,"line":375},[237,816,799],{"class":247},[237,818,802],{"class":243},[237,820,821],{"class":268},"name ",[237,823,449],{"class":243},[237,825,826],{"class":264}," __",[237,828,283],{"class":268},[237,830,831],{"class":286},"'Order Paid'",[237,833,366],{"class":268},[237,835,836],{"class":286},"'my-plugin'",[237,838,839],{"class":268}," );\n",[237,841,842,844,846,849,851,853,855,858,860,862],{"class":239,"line":381},[237,843,799],{"class":247},[237,845,802],{"class":243},[237,847,848],{"class":268},"description ",[237,850,449],{"class":243},[237,852,826],{"class":264},[237,854,283],{"class":268},[237,856,857],{"class":286},"'Fires when an order is paid in My Plugin.'",[237,859,366],{"class":268},[237,861,836],{"class":286},[237,863,839],{"class":268},[237,865,866,868,870,873,875,877],{"class":239,"line":386},[237,867,799],{"class":247},[237,869,802],{"class":243},[237,871,872],{"class":268},"group_id ",[237,874,449],{"class":243},[237,876,535],{"class":286},[237,878,269],{"class":268},[237,880,881,883,885,888,890,893],{"class":239,"line":398},[237,882,799],{"class":247},[237,884,802],{"class":243},[237,886,887],{"class":268},"type ",[237,889,449],{"class":243},[237,891,892],{"class":286}," 'wp_action'",[237,894,269],{"class":268},[237,896,897,899,901,904,906,908],{"class":239,"line":420},[237,898,799],{"class":247},[237,900,802],{"class":243},[237,902,903],{"class":268},"hook ",[237,905,449],{"class":243},[237,907,810],{"class":286},[237,909,269],{"class":268},[237,911,912,914,916,919,921,924],{"class":239,"line":425},[237,913,799],{"class":247},[237,915,802],{"class":243},[237,917,918],{"class":268},"hook_args ",[237,920,449],{"class":243},[237,922,923],{"class":247}," 2",[237,925,269],{"class":268},[237,927,928],{"class":239,"line":430},[237,929,378],{"class":268},[237,931,932],{"class":239,"line":443},[237,933,255],{"emptyLinePlaceholder":254},[237,935,936,939,941,944,946,949],{"class":239,"line":461},[237,937,938],{"class":243},"    protected",[237,940,340],{"class":243},[237,942,943],{"class":264}," validate",[237,945,283],{"class":268},[237,947,948],{"class":243},"...",[237,950,951],{"class":268},"$args ) {\n",[237,953,954,957,959,962,965,968,971,974],{"class":239,"line":470},[237,955,956],{"class":268},"        $order_id ",[237,958,449],{"class":243},[237,960,961],{"class":268}," $args[",[237,963,964],{"class":247},"0",[237,966,967],{"class":268},"] ",[237,969,970],{"class":243},"??",[237,972,973],{"class":247}," 0",[237,975,269],{"class":268},[237,977,978,980,983,986],{"class":239,"line":475},[237,979,464],{"class":243},[237,981,982],{"class":243}," !",[237,984,985],{"class":247}," empty",[237,987,988],{"class":268},"( $order_id );\n",[237,990,992],{"class":239,"line":991},23,[237,993,378],{"class":268},[237,995,996],{"class":239,"line":144},[237,997,255],{"emptyLinePlaceholder":254},[237,999,1001,1003,1005,1008,1010,1012],{"class":239,"line":1000},25,[237,1002,938],{"class":243},[237,1004,340],{"class":243},[237,1006,1007],{"class":264}," transform",[237,1009,283],{"class":268},[237,1011,948],{"class":243},[237,1013,951],{"class":268},[237,1015,1017,1019,1021,1023,1025,1027,1029,1031],{"class":239,"line":1016},26,[237,1018,956],{"class":268},[237,1020,449],{"class":243},[237,1022,961],{"class":268},[237,1024,964],{"class":247},[237,1026,967],{"class":268},[237,1028,970],{"class":243},[237,1030,973],{"class":247},[237,1032,269],{"class":268},[237,1034,1036,1039,1041,1043,1046,1048,1050],{"class":239,"line":1035},27,[237,1037,1038],{"class":268},"        $customer ",[237,1040,449],{"class":243},[237,1042,961],{"class":268},[237,1044,1045],{"class":247},"1",[237,1047,967],{"class":268},[237,1049,970],{"class":243},[237,1051,1052],{"class":268}," [];\n",[237,1054,1056],{"class":239,"line":1055},28,[237,1057,255],{"emptyLinePlaceholder":254},[237,1059,1061,1063],{"class":239,"line":1060},29,[237,1062,464],{"class":243},[237,1064,524],{"class":268},[237,1066,1068,1071,1073],{"class":239,"line":1067},30,[237,1069,1070],{"class":286},"            'order'",[237,1072,532],{"class":243},[237,1074,524],{"class":268},[237,1076,1078,1081,1083,1086,1089],{"class":239,"line":1077},31,[237,1079,1080],{"class":286},"                'id'",[237,1082,532],{"class":243},[237,1084,1085],{"class":268}," (",[237,1087,1088],{"class":243},"int",[237,1090,1091],{"class":268},") $order_id,\n",[237,1093,1095],{"class":239,"line":1094},32,[237,1096,1097],{"class":268},"            ],\n",[237,1099,1101,1104,1106],{"class":239,"line":1100},33,[237,1102,1103],{"class":286},"            'customer'",[237,1105,532],{"class":243},[237,1107,524],{"class":268},[237,1109,1111,1114,1116,1119,1122,1124,1126,1129],{"class":239,"line":1110},34,[237,1112,1113],{"class":286},"                'name'",[237,1115,532],{"class":243},[237,1117,1118],{"class":268}," $customer[",[237,1120,1121],{"class":286},"'name'",[237,1123,967],{"class":268},[237,1125,970],{"class":243},[237,1127,1128],{"class":286}," ''",[237,1130,538],{"class":268},[237,1132,1134,1137,1139,1141,1144,1146,1148,1150],{"class":239,"line":1133},35,[237,1135,1136],{"class":286},"                'phone'",[237,1138,532],{"class":243},[237,1140,1118],{"class":268},[237,1142,1143],{"class":286},"'phone'",[237,1145,967],{"class":268},[237,1147,970],{"class":243},[237,1149,1128],{"class":286},[237,1151,538],{"class":268},[237,1153,1155],{"class":239,"line":1154},36,[237,1156,1097],{"class":268},[237,1158,1160],{"class":239,"line":1159},37,[237,1161,1162],{"class":268},"        ];\n",[237,1164,1166],{"class":239,"line":1165},38,[237,1167,378],{"class":268},[237,1169,1171],{"class":239,"line":1170},39,[237,1172,255],{"emptyLinePlaceholder":254},[237,1174,1176,1178,1180,1183],{"class":239,"line":1175},40,[237,1177,938],{"class":243},[237,1179,340],{"class":243},[237,1181,1182],{"class":264}," placeholders",[237,1184,346],{"class":268},[237,1186,1188,1190],{"class":239,"line":1187},41,[237,1189,464],{"class":243},[237,1191,524],{"class":268},[237,1193,1195,1198,1201,1203,1206,1208,1210,1212,1215,1217,1220,1222,1225,1227,1230,1232,1235],{"class":239,"line":1194},42,[237,1196,1197],{"class":268},"            [ ",[237,1199,1200],{"class":286},"'path'",[237,1202,532],{"class":243},[237,1204,1205],{"class":286}," 'order.id'",[237,1207,366],{"class":268},[237,1209,1121],{"class":286},[237,1211,532],{"class":243},[237,1213,1214],{"class":286}," 'Order ID'",[237,1216,366],{"class":268},[237,1218,1219],{"class":286},"'type'",[237,1221,532],{"class":243},[237,1223,1224],{"class":286}," 'number'",[237,1226,366],{"class":268},[237,1228,1229],{"class":286},"'description'",[237,1231,532],{"class":243},[237,1233,1234],{"class":286}," 'Order identifier'",[237,1236,1237],{"class":268}," ],\n",[237,1239,1241,1243,1245,1247,1250,1252,1254,1256,1259,1261,1263,1265,1268,1270,1272,1274,1277],{"class":239,"line":1240},43,[237,1242,1197],{"class":268},[237,1244,1200],{"class":286},[237,1246,532],{"class":243},[237,1248,1249],{"class":286}," 'customer.name'",[237,1251,366],{"class":268},[237,1253,1121],{"class":286},[237,1255,532],{"class":243},[237,1257,1258],{"class":286}," 'Customer Name'",[237,1260,366],{"class":268},[237,1262,1219],{"class":286},[237,1264,532],{"class":243},[237,1266,1267],{"class":286}," 'string'",[237,1269,366],{"class":268},[237,1271,1229],{"class":286},[237,1273,532],{"class":243},[237,1275,1276],{"class":286}," 'Customer full name'",[237,1278,1237],{"class":268},[237,1280,1282,1284,1286,1288,1291,1293,1295,1297,1300,1302,1304,1306,1308,1310,1312,1314,1317],{"class":239,"line":1281},44,[237,1283,1197],{"class":268},[237,1285,1200],{"class":286},[237,1287,532],{"class":243},[237,1289,1290],{"class":286}," 'customer.phone'",[237,1292,366],{"class":268},[237,1294,1121],{"class":286},[237,1296,532],{"class":243},[237,1298,1299],{"class":286}," 'Customer Phone'",[237,1301,366],{"class":268},[237,1303,1219],{"class":286},[237,1305,532],{"class":243},[237,1307,1267],{"class":286},[237,1309,366],{"class":268},[237,1311,1229],{"class":286},[237,1313,532],{"class":243},[237,1315,1316],{"class":286}," 'Customer phone number'",[237,1318,1237],{"class":268},[237,1320,1322],{"class":239,"line":1321},45,[237,1323,1162],{"class":268},[237,1325,1327],{"class":239,"line":1326},46,[237,1328,378],{"class":268},[237,1330,1332],{"class":239,"line":1331},47,[237,1333,478],{"class":268},[210,1335],{},[213,1337,1339],{"id":1338},"modify-existing-triggers-with-hooks","Modify existing triggers with hooks",[190,1341,1342],{},"For any trigger ID, Pingo Notify exposes these extension points:",[197,1344,1345,1350,1355,1360,1365,1370],{},[200,1346,1347],{},[51,1348,1349],{},"infixs_pingo_notify_trigger_{trigger_id}_validate",[200,1351,1352],{},[51,1353,1354],{},"infixs_pingo_notify_trigger_{trigger_id}_transform",[200,1356,1357],{},[51,1358,1359],{},"infixs_pingo_notify_trigger_{trigger_id}_placeholders",[200,1361,1362],{},[51,1363,1364],{},"infixs_pingo_notify_trigger_{trigger_id}_form_fields",[200,1366,1367],{},[51,1368,1369],{},"infixs_pingo_notify_trigger_{trigger_id}_notifications_query",[200,1371,1372],{},[51,1373,1374],{},"infixs_pingo_notify_trigger_{trigger_id}_notifications",[190,1376,1377],{},"You can also listen globally when any trigger is fired:",[197,1379,1380],{},[200,1381,1382],{},[51,1383,1384],{},"infixs_pingo_notify_trigger_fired",[587,1386,1388],{"id":1387},"example-change-the-payload-of-an-existing-trigger","Example: change the payload of an existing trigger",[228,1390,1392],{"className":230,"code":1391,"language":232,"meta":233,"style":233},"add_filter( 'infixs_pingo_notify_trigger_woocommerce_new_order_transform', function ( $data, $args ) {\n    $data['custom'] = [\n        'source' => 'my-plugin',\n        'timestamp' => time(),\n    ];\n\n    return $data;\n}, 10, 2 );\n",[51,1393,1394,1410,1424,1436,1449,1453,1457,1464],{"__ignoreMap":233},[237,1395,1396,1398,1400,1403,1405,1407],{"class":239,"line":240},[237,1397,501],{"class":264},[237,1399,283],{"class":268},[237,1401,1402],{"class":286},"'infixs_pingo_notify_trigger_woocommerce_new_order_transform'",[237,1404,366],{"class":268},[237,1406,511],{"class":243},[237,1408,1409],{"class":268}," ( $data, $args ) {\n",[237,1411,1412,1415,1418,1420,1422],{"class":239,"line":251},[237,1413,1414],{"class":268},"    $data[",[237,1416,1417],{"class":286},"'custom'",[237,1419,967],{"class":268},[237,1421,449],{"class":243},[237,1423,524],{"class":268},[237,1425,1426,1429,1431,1434],{"class":239,"line":258},[237,1427,1428],{"class":286},"        'source'",[237,1430,532],{"class":243},[237,1432,1433],{"class":286}," 'my-plugin'",[237,1435,538],{"class":268},[237,1437,1438,1441,1443,1446],{"class":239,"line":272},[237,1439,1440],{"class":286},"        'timestamp'",[237,1442,532],{"class":243},[237,1444,1445],{"class":247}," time",[237,1447,1448],{"class":268},"(),\n",[237,1450,1451],{"class":239,"line":277},[237,1452,555],{"class":268},[237,1454,1455],{"class":239,"line":301},[237,1456,255],{"emptyLinePlaceholder":254},[237,1458,1459,1461],{"class":239,"line":306},[237,1460,564],{"class":243},[237,1462,1463],{"class":268}," $data;\n",[237,1465,1466,1469,1471,1473,1476],{"class":239,"line":317},[237,1467,1468],{"class":268},"}, ",[237,1470,660],{"class":247},[237,1472,366],{"class":268},[237,1474,1475],{"class":247},"2",[237,1477,839],{"class":268},[587,1479,1481],{"id":1480},"example-add-placeholders-to-an-existing-trigger","Example: add placeholders to an existing trigger",[228,1483,1485],{"className":230,"code":1484,"language":232,"meta":233,"style":233},"add_filter( 'infixs_pingo_notify_trigger_woocommerce_new_order_placeholders', function ( $placeholders ) {\n    $placeholders[] = [\n        'path' => 'custom.source',\n        'name' => 'Custom Source',\n        'type' => 'string',\n        'description' => 'Data injected by My Plugin',\n    ];\n\n    return $placeholders;\n} );\n",[51,1486,1487,1503,1512,1524,1535,1546,1558,1562,1566,1573],{"__ignoreMap":233},[237,1488,1489,1491,1493,1496,1498,1500],{"class":239,"line":240},[237,1490,501],{"class":264},[237,1492,283],{"class":268},[237,1494,1495],{"class":286},"'infixs_pingo_notify_trigger_woocommerce_new_order_placeholders'",[237,1497,366],{"class":268},[237,1499,511],{"class":243},[237,1501,1502],{"class":268}," ( $placeholders ) {\n",[237,1504,1505,1508,1510],{"class":239,"line":251},[237,1506,1507],{"class":268},"    $placeholders[] ",[237,1509,449],{"class":243},[237,1511,524],{"class":268},[237,1513,1514,1517,1519,1522],{"class":239,"line":258},[237,1515,1516],{"class":286},"        'path'",[237,1518,532],{"class":243},[237,1520,1521],{"class":286}," 'custom.source'",[237,1523,538],{"class":268},[237,1525,1526,1528,1530,1533],{"class":239,"line":272},[237,1527,543],{"class":286},[237,1529,532],{"class":243},[237,1531,1532],{"class":286}," 'Custom Source'",[237,1534,538],{"class":268},[237,1536,1537,1540,1542,1544],{"class":239,"line":277},[237,1538,1539],{"class":286},"        'type'",[237,1541,532],{"class":243},[237,1543,1267],{"class":286},[237,1545,538],{"class":268},[237,1547,1548,1551,1553,1556],{"class":239,"line":301},[237,1549,1550],{"class":286},"        'description'",[237,1552,532],{"class":243},[237,1554,1555],{"class":286}," 'Data injected by My Plugin'",[237,1557,538],{"class":268},[237,1559,1560],{"class":239,"line":306},[237,1561,555],{"class":268},[237,1563,1564],{"class":239,"line":317},[237,1565,255],{"emptyLinePlaceholder":254},[237,1567,1568,1570],{"class":239,"line":322},[237,1569,564],{"class":243},[237,1571,1572],{"class":268}," $placeholders;\n",[237,1574,1575],{"class":239,"line":334},[237,1576,572],{"class":268},[587,1578,1580],{"id":1579},"example-restrict-which-notifications-can-fire","Example: restrict which notifications can fire",[228,1582,1584],{"className":230,"code":1583,"language":232,"meta":233,"style":233},"add_filter( 'infixs_pingo_notify_trigger_woocommerce_new_order_notifications_query', function ( $query, $args ) {\n    return $query;\n}, 10, 2 );\n",[51,1585,1586,1602,1609],{"__ignoreMap":233},[237,1587,1588,1590,1592,1595,1597,1599],{"class":239,"line":240},[237,1589,501],{"class":264},[237,1591,283],{"class":268},[237,1593,1594],{"class":286},"'infixs_pingo_notify_trigger_woocommerce_new_order_notifications_query'",[237,1596,366],{"class":268},[237,1598,511],{"class":243},[237,1600,1601],{"class":268}," ( $query, $args ) {\n",[237,1603,1604,1606],{"class":239,"line":251},[237,1605,564],{"class":243},[237,1607,1608],{"class":268}," $query;\n",[237,1610,1611,1613,1615,1617,1619],{"class":239,"line":258},[237,1612,1468],{"class":268},[237,1614,660],{"class":247},[237,1616,366],{"class":268},[237,1618,1475],{"class":247},[237,1620,839],{"class":268},[210,1622],{},[213,1624,1626],{"id":1625},"recommendations","Recommendations",[197,1628,1629,1632,1638,1645,1651],{},[200,1630,1631],{},"Keep trigger IDs stable after release",[200,1633,1634,1635],{},"Use a plugin prefix in your IDs, such as ",[51,1636,1637],{},"myplugin_*",[200,1639,1640,1641,1644],{},"Return an empty array from ",[51,1642,1643],{},"transform()"," when the input is invalid",[200,1646,1647,1648,1650],{},"Use ",[51,1649,704],{}," when your trigger depends on another plugin",[200,1652,1653,1654,1656],{},"If your trigger type is ",[51,1655,639],{},", preserve the original filter behavior",[210,1658],{},[213,1660,1662],{"id":1661},"quick-checklist","Quick checklist",[197,1664,1665,1671,1677,1687,1695,1700,1706],{},[200,1666,1667,1668],{},"Your trigger class extends ",[51,1669,1670],{},"Trigger",[200,1672,1673,1674,1676],{},"A unique ",[51,1675,604],{}," is defined",[200,1678,1679,366,1681,1683,1684,1686],{},[51,1680,644],{},[51,1682,650],{},", and ",[51,1685,631],{}," are correct",[200,1688,1689,1691,1692,1694],{},[51,1690,1643],{}," and ",[51,1693,677],{}," are implemented",[200,1696,1697,1698],{},"The trigger is registered with ",[51,1699,222],{},[200,1701,1702,1703,1705],{},"The custom group is registered with ",[51,1704,490],{}," when needed",[200,1707,1708,1709,1712],{},"Existing trigger customizations use ",[51,1710,1711],{},"infixs_pingo_notify_trigger_{id}_*"," hooks",[1714,1715,1716],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":233,"searchDepth":258,"depth":258,"links":1718},[1719,1720,1721,1726,1731,1732],{"id":215,"depth":251,"text":216},{"id":483,"depth":251,"text":484},{"id":577,"depth":251,"text":578,"children":1722},[1723,1724,1725],{"id":589,"depth":258,"text":590},{"id":663,"depth":258,"text":664},{"id":681,"depth":258,"text":682},{"id":1338,"depth":251,"text":1339,"children":1727},[1728,1729,1730],{"id":1387,"depth":258,"text":1388},{"id":1480,"depth":258,"text":1481},{"id":1579,"depth":258,"text":1580},{"id":1625,"depth":251,"text":1626},{"id":1661,"depth":251,"text":1662},"md",{},{"title":49,"description":50},"en\u002Fhooks-and-development","6TEz6Th0BisjU3FWvRmv-xlEp1q73yqwBXwfHnw7n94",{"left":143,"top":143,"width":144,"height":144,"rotate":143,"vFlip":145,"hFlip":145,"body":1739},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fg>",{"left":143,"top":143,"width":144,"height":144,"rotate":143,"vFlip":145,"hFlip":145,"body":1741},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m15 18l-6-6l6-6\"\u002F>",{"left":143,"top":143,"width":144,"height":144,"rotate":143,"vFlip":145,"hFlip":145,"body":1743},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m9 18l6-6l-6-6\"\u002F>",1787698190926]