Prism Conditional Product Options for WooCommerce
Custom product options for WooCommerce: reusable variants, color swatches, surcharges, conditional fields, minimum quantity and file upload.
Install in
Prism Conditional Product Options for WooCommerce adds custom fields to your product pages and carries the customer’s choices through cart, checkout, order and emails.
- Field types: dropdown, single choice, multiple choice, short text, long text, date and file upload
- Variant library: define a group once and reuse it on many products, availability included
- Image swatches and color swatches you can click, with the number per row you choose
- Surcharges and discounts per option, with an estimated total on the product page
- Availability per option
- Conditional fields: show a field only when another option is chosen
- Minimum order quantity and quantity multiples per product
- Character limits on text fields
- File upload with content checks, stored in a private folder that is never reachable by direct link
- Optional automatic deletion of uploaded files some time after the order is completed
- Elementor widget to place the fields and style them from the Elementor panel
- Compatible with High-Performance Order Storage (HPOS)
- Privacy: uploaded files and text written by customers are covered by the WordPress personal data export and erasure tools
The plugin is written in English and includes an Italian translation.
Field placement
Open Products > Product Options, Variant library tab, and use the “I place the fields with shortcodes” switch.
- Off: the fields appear on their own above the quantity, in the order of the product’s groups. On variable products they appear after the variation choice.
- On: the fields appear only where you insert the shortcodes below.
Shortcodes
These apply when the switch is on.
[wcpo_group codice="fragrance"]shows one group, by the code chosen in the library (the code stays fixed if you rename the group)[wcpo_group nome="Fragrance"]shows one group by name (older method)[wcpo_campi]shows all the groups[wcpo_totale]shows only the estimated total[wcpo_varianti]shows the variation choice of a variable product (size, color…) where you place it, for example between two groups
Outside the single product template, add id="123" with the product ID.
On variable products, add posizione="varianti" to any of these shortcodes to show the fields right after the variation choice, wherever you placed the shortcode. Example: [wcpo_campi posizione="varianti"].
Elementor widget
With Elementor active, search for “Prism Product Options” in the widget panel. It works like the shortcodes, so turn on the “I place the fields with shortcodes” switch first.
- Content: show all the groups, one group (from the library or by name), only the estimated total or the variation choice. Optional product ID to use it on any page.
- Style: title beside or above the field, widths and spacing, divider lines, dropdowns and text fields (normal and focus), choice lists, swatches (per row, size, shape, radius, border, selected state, names), hints and estimated total. Most settings can differ on desktop, tablet and phone.
The groups and their options are still created in the plugin: the widget only places them and changes how they look.
Products without options
The page receives the body class wcpo-no-options. In Elementor, give the CSS class wcpo-solo-opzioni to headings, lines or containers that should appear only on products with options. Empty shortcodes hide their own widget.
For developers
Add-ons can extend the plugin with these hooks:
wcpo_loadedaction, and theWCPO_APIconstantwcpo_field_typesandwcpo_type_iconsfilters: new field types in the group editorwcpo_group_settingsaction andwcpo_sanitize_groupfilter: extra group settings and how they are saved; a block withdata-wcpo-types="date"appears only for those typeswcpo_render_fieldfilter: the HTML of a field on the product pagewcpo_validate_fieldfilter: extra checks before adding to cartwcpo_field_selectionfilter: what a field puts in the cart and its price, calculated on the serverwcpo_cart_surchargefilter: the total surcharge of a cart itemwcpo_frontend_datafilter, plusWCPO.onTotal(),WCPO.refresh()anddata-wcpo-pricein the page: the estimated totalwcpo_admin_tabsfilter andwcpo_admin_tab_{slug}action: extra tabs in Products > Product Options
Written by Joobi from the project's own listing. See the source page
4.3
- Animated plugin icon in the Product Options page (still for those who ask the system to reduce motion)
- Hooks for add-ons: new field types, extra group settings, field rendering, checks, server-side prices and admin tabs
- No change to saved data or to the store front
4.2
- New Elementor widget “Prism Product Options”: place all the groups, one group, the estimated total or the variation choice
- Style the fields from the Elementor panel: titles, layout, divider lines, dropdowns and text fields, choice lists, swatches, hints and total, with separate values for tablet and phone
- In the Elementor editor the widget shows a product with options as a preview
- No change to saved data; the shortcodes work as before
4.1.1
- Admin screens on phones: the page no longer runs wider than the screen, options take two lines instead of four, the shortcode table is stacked
4.1
- Live preview you can try: click swatches and choices, open the dropdown, type in text fields with the character counter, pick a date
- What you try in the preview is never saved and does not count as an unsaved change
- Live preview: swatches in a tidy grid, long names on two lines, the first 12 shown with a link to the others
- Tabs placed after the page title and version line
4.0
- Variant library: live preview of the open group, with colors, images, prices and items per row
- Variant library: search the groups by name, shortcode or option
- Variant library: each group shows how many products use it
- Tabs next to the page title; the product screen box has the same new look
- No change to saved data or to the store front
3.40
- New look for the admin screens: header with tabs, clearer group headers with type, option count, colors and shortcode, options in a table with price and availability switches, settings in a side column, save bar always visible with an unsaved-changes notice
- No change to saved data or to the store front
3.39
- Items per row: up to 12 on computer and 8 on mobile
3.38
- Choice groups: choose how many items per row, on computer and on mobile. Images and colors grow to fill the row
- Choice groups: option to hide the name under images and colors (it still appears on hover and in cart and order)
3.37
- New name and slug: Prism Conditional Product Options for WooCommerce. The text domain changes too; saved data, shortcodes and hooks stay the same
- Scripts are loaded only through the WordPress enqueue functions, no inline script tags
3.36
- New [wcpo_varianti] shortcode: the variation choice of a variable product where you place it, for example between two groups
- With shortcodes, the variation rows have no divider line, like the fields placed one per widget
- Overview: how to show groups created only inside a product
3.35
- Variable products: the fields now appear after the variation choice and the variation price, right above quantity and button (automatic placement)
- New posizione=”varianti” attribute for the shortcodes, to get the same placement in page builders
- With the fields after the variation choice, the variation rows take the same look as the option rows (title on the left, choice on the right)
- A group shown by two shortcodes on the same page appears only once
3.33
- New: optional automatic deletion of the files of completed orders, after the number of days you choose (Overview tab, off by default)
- Links to a deleted file show a clear message to whoever has access to the order
3.32
- New name and slug. The text domain changes too; saved data, shortcodes and hooks stay the same
- New Product Options page under Products, with Overview and Variant library tabs, and a Settings link in the plugins list
- Prepared for WordPress.org: GPL license, requires WooCommerce, English readme, output escaping, translator comments
3.31
- Fixed: saving an order line from the back office removed the link to the uploaded file
- Privacy: text written by the customer is anonymized on data erasure and included in the data export
3.30
- Security: the upload limit uses the real connection address, not headers that can be forged (behind a proxy: wcpo_upload_client_ip filter)
- Security: 2 GB cap on the cart uploads folder (wcpo_upload_quota_mb filter)
- Security: the Store API no longer saves files
- Fixed: customer emails sent from the back office had a link that required login
- Fixed: deleting a block checkout draft could remove a cart or order file
- Plain text emails: file link shown in full
- Dashboard warning if the private folder can be reached from outside (nginx, Apache with AllowOverride None)
3.29
- Fixed: the classic mini cart showed the base price without surcharges
- Fixed: “sold individually” could be bypassed through the options
- Fixed: groups with the same label overwrote each other in the order, files included
- Fixed: bold titles were applied outside emails too
- Quantity: the minimum is always a multiple of the step (minimum 40 with multiples of 7 becomes 42)
- Library: warning when saving fails because the page has expired
- No warnings for choice groups without options, no errors on malformed data
3.28
- Upload: empty extensions field means only the formats the plugin supports, never the WordPress list
- Upload: if saving the file fails, the product does not enter the cart
- Options: identified by label and price, not by position (clear the page cache after updating)
- Cart: an option changed or sold out after adding blocks checkout with a notice
- Prices: the surcharge is added to the price calculated by other plugins (discounts, price lists) instead of replacing it
- Products with options: in the catalog the button leads to the product page, the Store API does not add them without choices
- “Order again”: choices and surcharges are restored, files are copied
- Text: 5000 character limit if the field has none (wcpo_text_limit filter)
- Library and product screen: saved in a single field, no data loss beyond max_input_vars
- Store API: minimum and multiples enforced on older WooCommerce versions too
3.27
- Security: an option repeated in the request no longer multiplies a discount
- Security: required fields accept only existing options and non-empty text
- Security: the presence of parent groups no longer depends on browser data (list signed by the server)
- Upload: files in a private folder with random names, downloadable only from the cart, with the order key or by order managers
- Upload: at most 30 files per hour per IP, files from abandoned carts deleted after 14 days
- Upload: files deleted with the order and with privacy requests, names included in the data export
- Upload: AI, EPS and PSD accepted (previously always rejected)
- Fixed: reordering or deleting a group no longer breaks conditional fields
3.26
- Hexadecimal color for options without an image: round swatch, with picker and #hex field
3.25
- Estimated total: margins reduced to a minimum, it moves the rest of the page less
3.24
- Back office in English with Italian translation (group editor, library, product screen)
- Neutral examples in the help texts
3.23
- Fixed: a required field rejected the first option of the list (index 0) and the text “0”
- Upload: file content is checked on the server (a text file renamed .png is rejected, previously it was silently dropped)
- Amounts and total follow the WooCommerce settings (symbol, position, decimals, separators)
- Dates in cart and order use the format set in WordPress
- Store texts in English with Italian translation included (languages folder)
- JS and CSS in separate files (assets folder), spacing as CSS variables
- Code split into modules (includes folder)
3.22
- Automatic placement above the purchase form (outside the form, quantity and button are not touched)
- With shortcodes on, the estimated total still appears above quantity and button
3.21
- Automatic placement: the fields take a full row above quantity and button, also in themes that place those side by side
3.20
- Library switch: automatic placement above the quantity or shortcodes
3.19
- Variable products: the estimated total follows the chosen variation
- Script loaded once in the footer (it is not lost if a shortcode runs early)
- Delivery date: format and minimum weeks also checked on the server
- Upload: SVG no longer allowed, file type checked on the server
- Malformed input no longer causes fatal errors
- CSS loaded also with shortcodes outside the product page (id=”…”)
- Deleting a group from the library no longer shifts the dependencies of the others
- Duplicate shortcode codes in the library made unique; HPOS compatibility declared
3.18
- Email (new WooCommerce template): option titles in bold
3.17
- Email: sturdier bold; cart: link to the uploaded file can be opened
3.16
- Custom shortcode code per group (it does not change if you rename the title)
- Email: option titles in bold
- The customer can open the uploaded file (clean link)
3.15
- Products without options: empty shortcode widgets hidden, wcpo-solo-opzioni class
3.14
- Fixed display of discounts (negative amounts)
Follow this listing's changes (Atom feed)