| 开发者 | flexatech |
|---|---|
| 更新时间 | 2026年9月16日 23:16 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
base, qty and other fields' values with + - * / ( ) and round(), min(), max() (no eval), for per-unit and volume-tiered pricing<select> stays in place (hidden) and remains the source of truth: clicking a swatch drives WooCommerce's own variation logic, so price, stock and gallery image update exactly as before, unavailable combinations are dimmed, and keyboard selection workspa_*) that have terms; custom product-level attributes have no term to attach a colour/image to. If a dedicated plugin like Woo Variation Swatches is active, Flexa Extra steps aside automatically to avoid double renderingaria-required, keyboard focus), responsive, and reduced-motion aware/wp-content/plugins/flexa-extra or install it through the Plugins screen.Yes. Flexa Extra stays inactive (with an admin notice) until WooCommerce is active.
No. The extra price is recomputed server-side from your stored option definitions on add-to-cart and on every cart totals pass; the posted values are sanitized against the field schema.
Yes. The plugin declares HPOS compatibility.
Yes, see docs/HOOKS.md for the available actions and filters.
Yes. Each field is wrapped in a <div> with class hooks: flexa-extra-field on every wrapper, flexa-extra-field--<type> for all fields of a type, and flexa-extra-field--id-<field_id> for one specific field (plus data-field-id and data-field-type attributes). You can also add your own class per field in the builder: select the field and fill the "CSS class" box in the Inspector. See docs/HOOKS.md for examples.
Yes. The Import screen reads option sets from YayExtra, ThemeHigh "Extra Product Options" (free), WooCommerce Product Add-Ons, Acowebs "Custom Product Addons for WooCommerce", and YITH WooCommerce Product Add-Ons (free), and re-creates them in Flexa Extra, switched off. They appear in the Option Sets list for review; the storefront ignores them until you turn each one on. Field types, per-option prices, swatches and product assignment are mapped where an equivalent exists; anything that cannot be mapped 1:1 is listed per set so you can re-create it. Keep the source plugin active during the import so its data is readable.
Yes. Two open, read-only REST routes (/wp-json/flexa-extra/v1/public/config and /public/product/{id}) return the option sets, prices, and logic a front end needs to render the configurator and compute the live subtotal. They expose only what the on-page configurator already ships, and you can close the API with the flexa_extra/public_api/enabled filter. Add-to-cart and the final price are always recomputed server-side.
On a variable product, Flexa Extra can replace each attribute dropdown with colour, image or button swatches. It hides the native <select> but keeps it as the source of truth, so clicking a swatch uses WooCommerce's own variation logic for price, stock and the product gallery. Assign colours/images per attribute term under Flexa Extra → Variation Swatches. It works only with global attributes (pa_*) that have terms; custom product-level attributes have no term to attach to. If a dedicated swatches plugin (for example Woo Variation Swatches) is active, Flexa Extra defers to it automatically to avoid rendering swatches twice.
<select> stays as the source of truth, so price, stock and gallery image update through WooCommerce's own logic; unavailable combinations are dimmed and keyboard selection works. Works with global attributes (pa_*) that have terms; if a dedicated swatches plugin like Woo Variation Swatches is active, Flexa Extra defers to it automatically.base, qty and other fields' values, the operators + - * / ( ), and round(), min(), max(). The result is the per-unit surcharge, so qty is for volume tiers like max(2, 10 - qty) rather than a plain per-unit charge. Evaluated with a hand-written parser (never eval); a bad formula is worth 0 and never errors. The builder validates as you type.flexa-extra-field--<type> and flexa-extra-field--id-<field_id> classes so you can target a field type or one specific field from CSS.{ value, label } pairs, not the flat fieldType key the converter expected, so every field was skipped and each set dropped as empty. The real saved shape is now read, with the older flat form still accepted./public/config and /public/product/{id}) so a decoupled front end can render the configurator and compute the subtotal. Closable with the flexa_extra/public_api/enabled filter.url() context on the product page and in the cart, preventing CSS injection through crafted URLs.