Download the PHP package arraypress/wp-register-emails without Composer
On this page you can find all versions of the php package arraypress/wp-register-emails. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download arraypress/wp-register-emails
More information about arraypress/wp-register-emails
Files in arraypress/wp-register-emails
Package wp-register-emails
Short Description Merge tags, HTML email components and named transactional emails for WordPress plugins.
License GPL-2.0-or-later
Informations about the package wp-register-emails
Register Emails
Named transactional emails with merge tags, and HTML that survives Outlook.
What it does
A plugin that sends a receipt needs three things nobody enjoys writing: merge tags a shop owner can put in the subject line, HTML that renders the same in Gmail and Outlook, and a way to preview the result without placing a test order.
This registers tags and emails by name, resolves the tags against whatever object the email is about, and builds the markup from components rather than from a table layout you maintain by hand.
Features
- Register a merge tag with a preview value, so the tester shows something real
- Register an email by name, with its subject and body
- Send one by name, overriding the recipient or subject at the call site
- Preview an email without sending, or triggering whatever produces it
- Build the body from components — buttons, tables, panels — not raw HTML
- Offer the available tags to an editor, so an owner can insert them
Installation
Quick start
Register what the tags mean:
Then the email that uses them:
And sending it:
The preview value is what makes the tester useful — without it, previewing
an email means having an order to preview it against.
Tag types
A tag's type says how what its callback returns goes in. text, the
default, goes in as text — a billing name with markup in it reads as the name.
html goes in as it is, for a callback that builds its own markup. Any
component name — button, order_items, alert — draws that component from
what the callback returns. Tags work in the subject line as well as the body.
Requirements
- PHP 8.3 or later
- WordPress 7.1 or later
License
GPL-2.0-or-later