Freya Omnisend
Fork of omnisend-for-gravity-forms-add-on plugin. Adds functionality for conditions to prevent the lead from being added to Omnisend.
by JES WEB · github.com/jes-wd/omnisend-for-gravity-forms-add-on
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/jes-wd/omnisend-for-gravity-forms-add-on/archive/refs/heads/main.zipWordPress plugin for Freya Omnisend sync: WooCommerce subscription properties/tags, YWPAR referral sync, cookie cache, and (optionally) legacy Gravity Forms feeds.
Intake quiz → Omnisend contact creation is owned by freya-quiz (including legacy gravity_forms_* dual-write). The GF add-on is disabled by default via FREYA_OMNISEND_ENABLE_GF_SYNC (false). Re-enable only if you intentionally need GF form feeds again:
define( 'FREYA_OMNISEND_ENABLE_GF_SYNC', true );
Version: 9.9.9 (see OMNISEND_GRAVITY_ADDON_VERSION in class-omnisend-addon-bootstrap.php)
Text domain: freya-omnisend
Requirements
- WordPress / PHP suitable for Omnisend
- Email Marketing by Omnisend installed, up to date, and connected
- WooCommerce — required for subscription tooling / payment hooks
- WooCommerce Subscriptions — required for
Omnisend_WC_Subscription_Manager - Gravity Forms — not required unless
FREYA_OMNISEND_ENABLE_GF_SYNCis true - Advanced Custom Fields (ACF) — used by the subscription manager for
freya_product_typeon products (with fallbacks documented in code)
Installation
- Copy the folder to
wp-content/plugins/freya-omnisend/. - Install and connect Omnisend.
- Activate Freya Omnisend (GF is optional; leave GF sync off for freya-quiz intakes).
- Only if re-enabling GF feeds: activate Gravity Forms + Partial Entries and set
FREYA_OMNISEND_ENABLE_GF_SYNCto true.
What it does (overview)
| Area | Notes |
|---|---|
| Quiz intakes → Omnisend | Handled by freya-quiz, not this plugin (when GF sync is off). |
| Gravity Forms → Omnisend | Legacy only. Loaded when FREYA_OMNISEND_ENABLE_GF_SYNC is true. |
| Partial entries (Freya-specific) | Same gate as GF sync. Form 5 only. |
| After payment | woocommerce_payment_complete: updates/creates Omnisend contact by billing email — Google Shopping tag when freya_g cookie is set, non-paying customer tag for $0 parent subscription checkouts, used_coupon_{code} tags, GLP-1–related custom properties from product meta (freya_product_type, is_bundle, medication_name, units), customer_type (subscriber vs one-time-purchase) from order/subscription context. |
| Subscription manager | Loaded only when the site host is freyameds.com (see Omnisend_AddOn_Bootstrap::init_wc_subscription_manager). Omnisend_WC_Subscription_Manager syncs woocommerce_subscription_status_{product_type} properties, cancel-reason tags, and cancelled via admin / cancelled subscriber tag hygiene. Property updates also verify live host via HTTP_HOST. |
Gravity Forms settings (legacy)
In each form’s Omnisend feed settings (only when GF sync is enabled):
- Welcome email — optional Omnisend welcome automation trigger for new subscribers from that form.
- Omnisend Send Conditions — rules are suppress rules: if any condition matches, the contact is not sent to Omnisend. Supports operators such as is / is not / contains / empty, including checkbox-style values where applicable.
- Field mapping — email is required; map address, consent fields, phone, etc., as needed. Email and phone consent map to Gravity Forms Consent field types.
Custom properties for non-mapped fields use labels normalized to gravity_forms_{label} (spaces to underscores, lowercased).
Environment and hard-coded Freya assumptions
The following are intentional site- or product-specific hooks; change them in code if you fork for another site:
- Live domain gating — subscription manager bootstrap and some subscription property updates run only on
freyameds.com. - Medical / draft form flow — partial entry logic is tied to form ID 5, field IDs 113 / 116, cookie
freya_draft_token_5, and continue URL page 71301. - WP-CLI bulk scripts —
process-subscription-properties.phpdocuments that it expects the live host; align with your environment before running.
WP-CLI utilities (wp-cli/)
Run from the WordPress root with paths adjusted to this plugin, for example:
`wp eval-file wp-content/plugins/freya-omnisend/wp-cli/