| 开发者 | creare_creativita |
|---|---|
| 更新时间 | 2026年11月27日 18:47 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.2 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[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 groupsid="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.
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_loaded action, and the WCPO_API constantwcpo_field_types and wcpo_type_icons filters: new field types in the group editorwcpo_group_settings action and wcpo_sanitize_group filter: extra group settings and how they are saved; a block with data-wcpo-types="date" appears only for those typeswcpo_render_field filter: the HTML of a field on the product pagewcpo_validate_field filter: extra checks before adding to cartwcpo_field_selection filter: what a field puts in the cart and its price, calculated on the serverwcpo_cart_surcharge filter: the total surcharge of a cart itemwcpo_frontend_data filter, plus WCPO.onTotal(), WCPO.refresh() and data-wcpo-price in the page: the estimated totalwcpo_admin_tabs filter and wcpo_admin_tab_{slug} action: extra tabs in Products > Product Options/wp-content/plugins/, or install it from the Plugins screen, and activate it.In Products > Product Options, Variant library tab, for groups shared across products. For a single product, use the "Custom product options" box in the product screen.
Tick "Required field" on the group in the library: every product that uses the group follows it, and the product cannot be added to the cart until the customer fills the field. Inside a single product you can change it for that product only. A field hidden by a condition is never required while it is hidden.
Yes. Use the "Prism Product Options" widget to place the fields and change colors, sizes and spacing from the Elementor panel. The shortcodes in a Shortcode widget keep working too.
Yes. By default they appear above the quantity. To place them yourself, turn on the "I place the fields with shortcodes" switch and use the shortcodes listed in the description.
In wp-content/uploads/wcpo-private/, with random names. They can be downloaded only from the customer's cart, with the order key, or by users who manage orders. Files from abandoned carts are deleted after 14 days.
Until the order is permanently deleted or a privacy erasure request removes them. To save space, go to Products > Product Options, Overview tab, and turn on automatic deletion: choose after how many days from completion the files are deleted. The setting is off by default. Only completed orders are affected, including those you already have, and deleted files cannot be recovered. The order stays as it is: the file name remains visible, and the customer and the store see that the file was deleted.
Uploaded files are protected by an .htaccess file, which works automatically on most Apache servers. It has no effect on nginx or on Apache with AllowOverride None: there, anyone who has the exact address of a file can open it, even though the file names are random and the folder cannot be listed.
To close the folder on nginx, add this rule to the server block, or ask your hosting provider to do it:
location ^~ /wp-content/uploads/wcpo-private/ { deny all; }
On Apache, enable AllowOverride for the uploads folder. The warning goes away at the next automatic check.
wcpo_upload_client_ip: the real visitor address behind a proxy, for the upload limitwcpo_upload_limit: uploads per IP per hour (default 30)wcpo_upload_quota_mb: total size of the cart uploads folder in MB (default 2048)wcpo_text_limit: length of text fields with no limit set (default 5000)