| 开发者 | flexatech |
|---|---|
| 更新时间 | 2026年10月6日 17:11 |
| 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 rendering.mp4, YouTube or Vimeo URL, set on the product edit screen and placed first or last in the galleryaria-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, and the plugin says so to WooCommerce, so the plugins screen no longer lists it as uncertain. Under the blocks the chosen options are listed beneath each cart line, the surcharge is part of the line price the Store API returns, the cart checks still run before checkout, and the options are written onto the order line exactly as they are in the classic cart. Three small touches are drawn by the classic cart and checkout only, because the blocks have no filter to hang them on: the "Edit options" link on a cart line, the spend-more nudge from the Pricing add-on, and the tooltip that explains a checkout fee. Prices, fees and discounts are the same either way.
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.
flexaExtra.badges.conditionTypes adds a type to the picker on the Badges screen, matching the flexa_extra/badges/condition_types and flexa_extra/badges/condition_passes filters that already existed on the PHP side. Free's own two conditions, customer role and login state, cannot be replaced or removed. Nothing changes without an add-on listening..mp4, YouTube or Vimeo URL on the product edit screen, placed first or last.advanced-cache.php drop-in. The setting shows which cache it found, and adds a note when the site sits behind Cloudflare or relies on WP-Cron.flexa_extra/cache/fragments_enabled, flexa_extra/cache/page_cache_detected, flexa_extra/cache/purge, flexa_extra/cache/schedule_boundaries and flexa_extra/pricing/rule/exhausted.wp flexa-extra demo import --template=<id> --store=<url> command pulls a template store's catalog (products and variations, categories, tags, global attributes and their terms, reviews, images and the matching Flexa option sets) into a fresh site, reusing a matching slug instead of creating a -2 copy on a second run. wp flexa-extra demo remove takes it all back out, leaving anything you created yourself untouched. Everything imported is stamped, so removal is exact.FLEXA_EXTRA_DEMO_ADMIN as true in wp-config.php. The screen is a developer tool and stays out of the way on a normal store.<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.