Linux 软件免费装
Banner图

WPMelon Product Customization Fields for WooCommerce

开发者 wpmelon
更新时间 2026年11月5日 21:29
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce custom fields product addons product options swatches

下载

1.0.0 1.1.0

详情介绍:

WPMelon Product Customization Fields lets you add extra fields to your WooCommerce products. Shoppers fill them in on the product page, each choice can change the price, and everything they picked shows up in the cart, checkout, order, emails and My Account. Included in the free version: file uploads, color and label swatches, prices per option, one-time fees, conditional logic with several rules and number comparisons, WPML and Polylang support, JSON import and export of option groups, and full support for the block cart and checkout. On the product page it loads one small script (about 5 KB gzipped, no jQuery), and only on products that have options. Field types Pricing per option Conditional logic Show or hide a field depending on the fields above it. Combine several rules and choose whether all or any of them must match; each rule checks whether a field is, is not, is empty or is not empty. Number fields can also be compared: greater than, less than, at least or at most a number (decimals allowed), for example "show Bulk engraving when Names is at least 10". Hidden fields are ignored when the order is placed. Where options appear Create option groups once and assign them to every product, to products in chosen categories or tags (with exclusions), or attach a group on a single product's edit screen. Works with simple and variable products, classic themes and block themes, and the classic and block cart and checkout. Import and export Export one option group, or all of them, as a JSON file and import it on another site, for example from staging to the live store. You see what will be imported before anything is saved. Imported groups start disabled, so shoppers see nothing until you turn them on. Multilingual stores Works with WPML and Polylang. Field labels, descriptions, placeholders, choice labels, headings and paragraphs are registered for translation, and a group assigned to a product, category or tag also applies to their translations. Privacy The plugin makes no external requests and collects no usage data. Known limitations Pro WPMelon Product Customization Fields Pro adds to the free version, which stays complete on its own: Early-bird buyers keep their early-bird price for as long as their license stays active.

安装:

  1. Install and activate WooCommerce.
  2. Install and activate WPMelon Product Customization Fields for WooCommerce.
  3. Go to Products → Product Options and create your first option group.

屏幕截图:

  • Options on a product page with the live total (Storefront theme).
  • The same options in a block theme (Twenty Twenty-Five).
  • The selected options and their prices in the block cart.
  • An order in the admin, with the options and the customer's uploaded file.

常见问题:

Does it work with the block cart and checkout?

Yes. Selected options and their prices show in the classic and block cart and checkout.

Does it work with variable products?

Yes. Percentage prices follow the price of the selected variation.

How do one-time fees work?

Set an option's charge to "Once per line" and its price is added once for each cart line, whatever the quantity, as a cart fee named after the product and the option. A percentage is a percentage of one unit's price. The fee uses the product's tax status and tax class. The same product added twice with different choices is two cart lines, so it pays the fee twice.

Do coupons discount one-time fees?

No. WooCommerce coupons apply to product prices, not to fees, so one-time fees are charged in full. Options charged per item are part of the product price and are discounted as usual.

Why don't Apple Pay, Google Pay or PayPal buttons show on some product pages?

Express-pay buttons on a product page buy the product directly, without the option fields, so the shopper's choices would be lost. The plugin hides them on the product pages of products that have options (WooCommerce Stripe Gateway, WooPayments and WooCommerce PayPal Payments). They still show in the cart and at checkout, where the options are already in the cart.

Does it work with WPML or Polylang?

Yes. Every text shoppers see in an option group (field labels, descriptions, placeholders, choice labels, headings and paragraphs) is registered for translation in the "WPMelon Product Customization Fields" group: with WPML under WPML → String Translation (WPML String Translation must be active), with Polylang under Languages → Translations. The option group editor always shows and edits the original texts. Shoppers see the translations on the product page, in the cart and at checkout, and the options are saved on the order in the language the order was placed in. A group assigned to a product, category or tag also applies to their translations, and a group attached to one translation of a product applies to all of them. Polylang translates by text, so two fields with the same label share one translation. With WPML and the block checkout, choose directories or a domain per language under WPML → Languages → Language URL format: when the language is a URL parameter (?lang=), the checkout runs in the default language and the whole order, options included, is saved in that language. Option prices are not converted per currency; see "Known limitations" for currency switchers.

How do I copy option groups to another site?

Under Products → Product Options, choose Export in a group's menu, or Export all, to download a JSON file. On the other site, choose Import, pick the file (2 MB at most, up to 50 groups) and check the preview, then import. Imported groups are added after the existing ones, disabled, with their titles, fields, choices, prices and conditions unchanged. A group assigned to all products keeps that. For a group assigned to chosen products, categories or tags, only the ones that exist on the new site and match (products by SKU, or by slug when they have no SKU; categories and tags by slug) are kept; when none is left, the group applies only where you attach it. Groups are never attached to products by an import, and importing the same file twice makes two copies. Only shop managers and administrators can export and import, and files are read as JSON only.

What is in the export file?

Plain JSON: "format": "wpm-pcf-groups", a format_version (1), the plugin version that made it, and a groups list. Each group has a stable uid, its title, its fields and assignment exactly as the plugin stores them (field and choice ids included, because conditions point at them), refs with the SKU, slug and name of every assigned product and the slug and name of every assigned category and tag, and attachments, the products the group is attached to. A media list gives the address, file name and alt text of the images its choices use. Post IDs of groups are not included. A newer plugin version always reads files from older ones; an older version refuses a file with a newer format_version.

Where are uploaded files stored?

In a private folder inside your uploads directory, under random file names. Customers see only the file name; shop managers download files from the order screen.

How do I switch to Pro?

Upload the Pro zip under Plugins → Add Plugin → Upload Plugin. It installs next to the free plugin, and only one of them can be active. Deactivate the free plugin, then activate Pro. Your option groups, settings and orders stay. You can then delete the free plugin: Pro keeps using the same data. If your store isn't in English, keep it installed but inactive instead: deleting it also removes its translations, and Pro uses them.

What happens to my option groups if I delete the plugin?

They stay, unless you turn on "Remove all data when the plugin is deleted" under Products → Product Options → Settings. With it on, deleting the plugin removes the option groups, the groups attached to products and the files customers uploaded. While the free plugin and Pro are both installed, deleting one of them keeps all of this: the setting applies when you delete the last one. Options already saved on orders always stay on the orders, and deactivating the plugin never deletes anything.

Is customer text safe to print in my own code?

Text and textarea values are kept as the customer typed them, except HTML tags are removed (and no "<" that could start a tag is kept). They are plain text, not HTML: escape them for the context you print them in (esc_html(), esc_attr()), as WooCommerce and this plugin do.

My store is behind Cloudflare or another proxy. Do uploads still work?

Yes, but upload limits count per visitor IP address, and behind a proxy every visitor arrives from the proxy's address. Return the real visitor IP from the wpm_pcf_upload_client_ip filter, read from the header your proxy sets (for example CF-Connecting-IP). Without it, all visitors share one limit of 20 uploads per 10 minutes. The wpm_pcf_upload_rate_limit, wpm_pcf_pending_max_files (default 500) and wpm_pcf_pending_max_bytes (default 1 GB) filters change the limits.

更新日志:

1.1.0 1.0.0