=== Custom Meta Fields for FluentCart ===
Contributors: projectaaron
Tags: fluentcart, custom fields, gtin, ean, structured data
Requires at least: 5.9
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add your own fields to FluentCart products and show them anywhere with a shortcode, plus GTIN, MPN and brand per variation for Google.

== Description ==

Custom Meta Fields for FluentCart adds the product fields FluentCart leaves out. Define a field once and it appears on every FluentCart product edit page, in its own card below the product details.

Values are stored as real WordPress post meta and registered with `register_post_meta()`, so they are typed, exposed in the REST API, copied when a product is duplicated, and readable by page builders' custom-field dynamic tags.

= Free features =

* **Unlimited product fields:** text, textarea, number, select, checkbox, URL, email, date and color.
* **Shortcodes:** `[upfluent_cmf_field key="FIELD_ID"]` prints a field anywhere, with the shortcode shown and copyable next to each field.
* **Product structured data:** Product, BreadcrumbList and Organization JSON-LD built live from FluentCart prices, stock, images, store address, return policy and shipping rates.
* **GTIN, EAN, UPC, ISBN and MPN per variation:** FluentCart has a SKU per variation but no GTIN. Add one to every variation, plus a brand per product, with check-digit validation and duplicate detection. They go into Google structured data (as a ProductGroup with one variant per variation), and `[upfluent_cmf_gtin]` shows the selected variation's code.
* **Fluent look:** the settings screen matches the Fluent suite, supports dark mode and loads inside the FluentHub portal.
* **REST API and WordPress Abilities (MCP):** let AI agents and integrations manage your fields.
* **Permissions:** follows FluentCart's own roles for who can define fields and edit values.

= Pro plugin =

[Custom Meta Fields for FluentCart Pro](https://upfluent.io/meta-fields/) is a separate plugin, sold on upfluent.io, that replaces this one and adds:

* **Media fields:** images, video, audio or files from the media library, rendered responsively.
* **Repeater fields:** rows of sub-fields with drag-and-drop ordering, and `[upfluent_cmf_repeater]` in list, grid or scrolling-row layouts.
* **Elementor widgets** for media and repeater fields.
* **Checkout fields:** add your own questions to the FluentCart checkout with placement, required and conditional logic. Answers are saved on the order and shown on the order screen, the thank-you page and in emails.
* **File uploads at checkout,** stored through FluentCart's own storage driver (local, S3 or R2).
* **Identifier import:** bring GTINs and MPNs over from WooCommerce (its own GTIN field and the common GTIN plugins), matched on SKU, or import a CSV. Every row is previewed before anything is saved.

== Installation ==

1. Install and activate FluentCart.
2. Upload the plugin zip under Plugins → Add New → Upload, and activate.
3. Go to FluentCart → More → Custom Fields (or Custom Fields in the FluentHub portal).
4. Add a field, then open any product to fill it in.

== Frequently Asked Questions ==

= Where do I get support? =
At [upfluent.io/support](https://upfluent.io/support/). Free and Pro users are both welcome.

= Where are product values stored? =
As WordPress post meta on the product, keyed by the field ID.

= Where are checkout answers stored? =
On the order, in FluentCart's order meta, with a snapshot of the field label so old orders never change.

= Can I add a GTIN or EAN to each variation? =
Yes, in the free version. Open a product: GTIN and MPN are columns right next to SKU in FluentCart's Inventory Management table, and save as you leave the field. The brand is set in the Custom Meta Fields card. A 10-digit ISBN is converted to its 13-digit GTIN automatically.

= I am moving from WooCommerce. Can I keep my GTINs? =
Yes, with Pro. If the WooCommerce data is still in the same database, Custom Fields → Identifiers → Import from WooCommerce matches every GTIN to its FluentCart variation by SKU. Otherwise export a CSV of SKU and GTIN and import that.

= Does it need Fluent Forms? =
No. Checkout fields (Pro) render directly into FluentCart's checkout form.

= Does this plugin send data anywhere? =
No. This plugin makes no outside requests and collects no data. The separate Pro plugin contacts upfluent.io only to activate its licence and check for updates.

= How do I get Pro? =
Buy Pro or start the 14-day free trial at [upfluent.io](https://upfluent.io/fluentcart-custom-meta-fields/). Download the Pro plugin from your account and upload it under Plugins → Add New. It replaces this plugin and keeps all your fields and values.

== Changelog ==

= 1.0.0 =
* Initial public release.
* Custom product fields (text, textarea, number, select, checkbox, email, URL, date, color) in a card in the FluentCart product editor sidebar, saved with FluentCart's Update button.
* [upfluent_cmf_field] and [upfluent_cmf_gtin] shortcodes and Elementor widgets.
* GTIN, MPN and brand per variation, with CSV import.
* Product structured data: brand, identifiers, book details, seller, shipping and return info, added to FluentCart's own product schema on FluentCart 1.7+.
* Pro (separate plugin): Media and Repeater fields, [upfluent_cmf_repeater], checkout fields and licensed updates.
