=== FunnelKode Funnel Builder Lite ===
Contributors:      pxelcode, esratpopy
Tags:              fluentcart, funnel, checkout, elementor, sales funnel
Requires at least: 6.2
Tested up to:      7.1
Stable tag:        1.1.29
Requires PHP:      7.4
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Build multi-step sales funnels for FluentCart: landing pages, checkout pages and thank-you pages, with Elementor or the block editor.

== Description ==

FunnelKode turns FluentCart into a complete sales funnel system. Build high-converting multi-step funnels — landing page → checkout → thank you — without touching any code.

**Free features:**

* **Funnel Canvas & List View** — create and manage funnels from a visual canvas or a sortable list view. Drag to reorder steps, add or remove steps in one click.
* **Page Builder Choice** — design every step with Elementor (full template library, recommended) or the WordPress block editor (starter layouts included).
* **2-Column Checkout Layout** — the checkout widget ships a form-left / order-summary-right two-column layout with a sticky sidebar, adjustable column width, and configurable gap — matching the look of premium checkout plugins.
* **Variation Selector** — let customers pick a product variation (plan, size, tier) before the FluentCart checkout form, with radio, card, or dropdown display styles.
* **Auto-Apply Coupons** — use an existing FluentCart coupon or create a custom one (discount type, amount, expiry date, usage limit) directly from the funnel step settings. Applied automatically when the visitor reaches the step.
* **Modal Checkout** — open the checkout in a popup overlay instead of navigating away, keeping customers on the landing page.
* **Thank You Pages** — funnel-specific thank-you pages with a real order confirmation widget showing order number, items, total and customer details.
* **Mini Cart & Drawer** — slide-out cart drawer with live item count.
* **Countdown Timer** — urgency countdown that redirects or hides on expiry.
* **Block Editor Blocks** — Section, Button, Offer, Testimonial, Countdown, Checkout and more — all render on the frontend via shortcodes.
* **Starter Templates** — import ready-made step designs from the bundled template library.
* **Import / Export** — move funnels between sites as JSON.

**Pro features** (separate paid plugin — [FunnelKode Pro](https://pxelcode.com/)):
Order bumps, one-click upsells/downsells, real funnel analytics, UTM attribution, opt-in forms.

== External Services ==

All starter templates included with this plugin are **bundled locally** — no internet connection is required to use them. The plugin works fully offline.

This plugin can optionally connect to the FunnelKode template service (funnelkode.com, operated by pxelCode, the maker of this plugin) to let you browse and import additional community templates beyond the ones bundled. This is **off by default** — no request to funnelkode.com is made until you explicitly enable it from the "Enable Online Template Library" notice on the Templates screen (or click "Sync Library" in Settings), and you can turn it off again at any time.

When enabled, this plugin periodically requests the template list from `https://funnelkode.com/wp-json/pxfcf/v1/templates`, and requests full template content from the same endpoint when you choose to import a specific template. Each request sends:

* A standard HTTP User-Agent string that includes this plugin's version and your site's URL (`get_bloginfo( 'url' )`), so the service can identify compatible requests.
* If you have activated a FunnelKode Pro license, your license key is sent as a request header so the server can verify Pro access.

No visitor data, page content, order data, or analytics are ever transmitted. Terms of use: https://funnelkode.com/terms/. Privacy policy: https://funnelkode.com/privacy-policy/.

This plugin also connects to your own FluentCart installation (same server) for checkout and order data — no third-party service is involved.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install it from the Plugins screen.
2. Activate the plugin through the Plugins menu.
3. Make sure FluentCart is active (Elementor is optional but recommended).
4. Go to FunnelKode in your admin menu to create your first funnel.

== Frequently Asked Questions ==

= Does this plugin require Elementor? =

No. Elementor is recommended for the best experience, but every step can also be built with the WordPress block editor.

= Does this plugin track my visitors or orders? =

No. The analytics screen in this plugin shows static sample data only. Real analytics are part of the separate FunnelKode Pro plugin.

= Does this modify FluentCart? =

No. FunnelKode integrates with FluentCart through its public hooks. Products, carts, pricing, coupons, taxes, payments and orders remain fully handled by FluentCart.

== Changelog ==

= 1.1.29 =
* Added 2-column checkout layout (sticky order summary, configurable width and gap), modal checkout popup, custom coupon creation (type, amount, expiry, usage limit), and block editor starter layouts per step type.
* Fixed currency symbols encoded as &#36;, Elementor template full-width rendering, canvas empty when Elementor inactive, step Edit links ignoring Page Builder setting, and several widget output/escaping issues.
* Renamed internal `fk_`/`FK_` identifiers to `funnelkode_` for WordPress.org compliance. Requires FunnelKode Pro 2.0.18+ if Pro is active.

= 1.1.19 =
* Removed: the published-funnel limit in the free version. Create as many funnels as you need; Pro adds features (order bumps, upsells/downsells, real analytics, opt-in forms), not quantity.
* Updated: bundled Chart.js library to 4.5.1 (loaded locally, no external CDN).
* Security: Elementor edit-mode metadata is now set from Elementor's own editor lifecycle instead of request parameters.
* Improved: all widget and admin JavaScript/CSS is now loaded through wp_enqueue_* (countdown timer runtime moved to assets/js/pxfcf-countdown.js).
* Removed: unfinished onboarding module.
* Removed: Pro-only Order Bump / Upsell / Downsell shortcode and block stubs from the free plugin (these are now registered by FunnelKode Pro).
* Security: shortcode and block render callbacks now return wp_kses-escaped output.

= 1.1.2 =
* Fixed: fatal error on funnel checkout pages when the Pro add-on's UTM attribution was active (namespace resolution).
* Fixed: Order Bumps / Upsells / Recent Orders analytics queried database columns that do not exist (schema mismatch).

= 1.1.1 =
* New: `funnelkode_visible_submenus` filter so extensions can register visible FunnelKode admin pages.

= 1.1.0 =
* New architecture: FunnelKode is now the always-running core; the Pro add-on (v2+) provides Pro features on top of it instead of replacing it.
* Campaigns analytics tab (locked preview in free), shared analytics page chrome, modernized Contacts/Abandoned UI plumbing.
* Upsell/Downsell picker cards now show locked state with a clear reason instead of disappearing.
* License menu stays visible after activation (fix); analytics currency respects store currency.

= 1.0.19 =
* WordPress.org release preparation: unified text domain, removed bundled updater, security hardening.
* Landing steps now show only landing-relevant settings.
* Simplified coupon panel — coupons are managed in FluentCart.
* Shared confirmation dialogs for trash/delete/duplicate actions.
* Responsive, overlap-free admin dashboard.

= 1.0.4 =
* Previous public build.
