Zum Inhalt springen

Configuration

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Add-Ons is configured in two places: the global settings page for store-wide display, and the Add-Ons tab in the product editor where you define each product’s fields. The global screen holds appearance and an on/off switch only, the actual options live on each product.

Open WooCommerce → Add-Ons in wp-admin. The screen needs the manage_woocommerce capability, so shop managers can use it, not only administrators. All settings are stored in the single addons_settings option (an array).

The master switch, on by default (enabled). When off, no add-on fields render on any product and no price deltas are applied in the cart, even on products that still have add-ons configured. Use it to take the whole feature offline without deleting any product’s settings.

The heading printed above the fields on the product page (group_title), for example Product options or Personalise your order. The packaged default is Product options. Clear the field to render the fields with no heading at all.

Three appearance checkboxes that change how the group looks. They affect presentation only, never pricing or which options show.

  • Show the price next to paid options (show_prices), appends the extra cost in brackets, e.g. Gift wrap (+$5.00). Free options never show a price. On by default.
  • Mark required fields with an asterisk (show_required), adds a red * after a required field’s label. The requirement is still enforced with this off; the asterisk is only a visual cue. On by default.
  • Wrap the options in a bordered card (card_style), groups the fields in a subtle bordered box (the addons-fields--card class). Turn it off for a plain inline layout that inherits the theme. On by default.

The options themselves live on the product. Edit a product, open the Add-Ons tab in the Product data panel, and add rows. Each row has:

  • Label, the text the shopper sees. A row with no label is dropped on save.
  • Type, Text (free-form input), Checkbox (a yes/no extra), or Select (a drop-down of choices).
  • Required, when on, the field must be filled before the product can be added to the cart.
  • Price, an amount added to the cart line when the option is taken. Leave it blank for a free option. The value is clamped to a non-negative surcharge: a negative price is saved as zero, so a buyer can never drive a line below its base price.
  • Select options (Select type only), one choice per line as Label | price, e.g. Standard | 0 and Premium | 9.99. Omit the price for a free choice. Each choice’s own price overrides the row price for that selection.

Definitions are stored as the _addons_definitions product meta, there are no custom database tables.

When a shopper picks paid options, each price delta is added to the product’s cart line total automatically. The selected values are captured onto the cart line and copied to the order as line-item meta, keyed by the field label, with the price appended when the choice cost more than zero, so the store sees exactly what was chosen.

  • A negative price is never stored, deltas are always surcharges.
  • A Select field with no choices is skipped on the storefront rather than rendering an empty drop-down.
  • The supported field types are text, checkbox and select; any other type is rejected on save.

Deleting the plugin runs the uninstall routine, which removes the addons_settings and addons_db_version options. Your per-product field definitions (the _addons_definitions meta) are kept on purpose, so re-installing Add-Ons restores the configured products without rebuilding the forms.

For the filters and actions that let an extension reshape definitions or add admin fields, see Using Add-Ons → Developer hooks.