Fluentcart products inventory

From Lonsdale201/wp-agent-skills · View interactive version

Fluentcart products inventory is an AI agent skill from the GitHub repository Lonsdale201/wp-agent-skills. Implements and audits FluentCart products, details, variations, pricing, custom attributes, taxonomies, downloadable flags, bundles, and stock movements. Use when creating or updating fluent-products records, calling ProductResource or ProductVariationResource, adding variation types, syncing produc

How to use this skill

Skill file

FluentCart products and inventory

Maintain the whole product aggregate: WordPress post, product detail, variants,

attribute relations, media/download data, tax/shipping configuration, and stock.

Read product-contract.md before implementing a

writer, importer, bundle, custom variation type, or inventory sync.

Understand the aggregate

fluent-products.

fct_product_variations.

product-brands.

as WordPress terms.

substitute the parent product ID.

casts are double.

Write through coordinated APIs

Prefer ProductResource and ProductVariationResource for product-editor-like

mutations. Use Taxonomy for FluentCart taxonomy synchronization. Use native

WordPress post functions only when the change truly affects only post fields.

Do not create a complete product with wp_insert_post() alone. It leaves detail,

variation, pricing, and relationship rows absent. Do not update stock columns

independently; available, on_hold, committed, total_stock, stock_status, and the

product-level stock availability must stay coherent.

For batch import:

  1. Normalize all amounts to integer minor units.
  2. Create or map product posts.
  3. create details and variants through Resource/service code;
  4. map custom attributes separately from WP taxonomies;
  5. attach downloads/media;
  6. validate SKU uniqueness and purchasability;
  7. dispatch or reproduce the normal product/variation change path;
  8. verify counts and orphan rows after the batch.

Observe the right event

| Need | Hook/event |

|---|---|

| General product save | fluent_cart/product_updated |

| Product editor variant save | fluent_cart/product/variants_updated |

| Variant set changed and default may be invalid | fluent_cart/product_variations_changed |

| Stock changed | fluent_cart/product_stock_changed |

| Extend supported variation types | fluent_cart/variation_types |

| Adjust data accepted during variant save | fluent_cart/product/variant_save_data |

Do not use a display/render hook as a durable catalog event. Scope callbacks by

post ID and make external synchronization replay-safe.

Inventory rules

before accepting a quantity.

status, and bundle-child availability.

available, on_hold, and committed and records order meta stock_movement.

digital orders, bundles, and repeated events.

Query efficiently

custom query per row.

Free/Pro boundary

The product, variant, custom attribute, stock, download, and recurring-plan base

models are Free in 1.6.0. Pro adds installments and promotional/order-bump

features; do not make all subscription-priced products or all promotions

Pro-only.

Cross-references

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.