Why does funnelzi have hooks for add-ons?
funnelzi keeps its own products, orders and checkout. An add-on can sell through another store instead, for example a shop plugin that already has its products and payments, and still use the funnel pages, the canvas and the flow of funnelzi. The filters below are the points where an add-on steps in. They exist in funnelzi 1.2.0 and later.
How does an add-on know that the checkout can be replaced?
funnelzi defines the constant FUNNELZI_CHECKOUT_FILTER as true when the checkout filter is available. Test for it before you rely on the hooks, and show a notice in the admin if the installed funnelzi is older.
Which filters are available?
funnelzi_checkout_htmlreceivesnull, the step and the shortcode attributes. Return the HTML of the checkout of that step to replace the funnelzi checkout. Returnnullto keep it.funnelzi_offer_htmlreceivesnull, the step and an array with the texts of the buttons and the addresses to accept or decline. Return the HTML of the one-click offer.funnelzi_summary_htmlreceivesnull, the order code and the attributes. Return the HTML of the order summary shown on the thank-you step.funnelzi_purchase_datareceivesnulland the order code. Return an array withid,valueandcurrencyso the Purchase event of Meta, GA4 and TikTok is sent for a sale that funnelzi does not hold.funnelzi_order_token_validreceivesfalseand the order code. Returntrueif your add-on recognises that code, so the funnel pages accept it like a funnelzi order.funnelzi_currenciesreceives the list of currencies, code and symbol. Add yours to make it available on products and prices.
What does funnelzi do when no add-on answers?
Nothing changes. Every filter starts with null or false, so a site without an add-on behaves exactly as before.
Is there a ready-made example?
The add-on that connects funnelzi to a store is built on these filters. When it is published you will find it linked from the documentation. For help with your own add-on, open a ticket from the support page.