Skip to content

Configuration

Sizer has two parts to configure: the charts you build and reuse, and the two wording settings that control the text shoppers see. Everything is under WooCommerce → Size Guides, which has two tabs, Settings and Size charts. There is intentionally no display-style, trigger-style or placement choice: the guide is always a button rendered after the add-to-cart button that opens a modal.

The Settings tab has exactly two fields, stored together in the sizer_settings option.

The clickable text on the product page that opens the chart, the value of trigger_label. Keep it short; Size guide, Size chart or Find my fit all read well next to the price. Leave it blank and Sizer falls back to Size guide. A small preview of the storefront button is shown under the field so you can see the wording without leaving the page.

The heading shown at the top of the dialog once it opens, the value of modal_title. Leave it blank to reuse the Link wording above, so by default the button and the heading read the same.

Both fields are sanitised with sanitize_text_field on save. The settings page (and the chart manager) require the manage_woocommerce capability.

On the Size charts tab a chart is a labelled table, for example sizes down the side (S, M, L) and measurements across the top (Chest, Waist, Length). Each chart has:

  • id, a slug generated from the name (or a random chart-xxxxxxxx fallback); you do not edit it directly.
  • name, required, used in the assignment dropdown and as the table’s screen-reader caption.
  • caption, optional text shown below the table on the storefront.
  • columns, the header cells.
  • rows, one list of cells per row; the first cell renders as a row header (<th scope="row">).

Charts are stored together in the single sizer_charts option (not autoloaded). Saving the form replaces the whole set, so the page is the source of truth, there is no per-chart save. Empty rows and unnamed charts are stripped during save.

A chart only appears once it is assigned to a product. Edit the product, open Product data → Size guide, and pick the chart in the Size chart select. The choice is stored as the _sizer_chart_id post meta and saved with a nonce and an edit_product capability check. Choosing - No chart - removes the meta, so the guide disappears from that product.

There is no category-level or store-wide assignment in the free edition. A store-wide default chart (one chart for every product with no explicit assignment) is the single shipped Sizer Pro feature; it works through the sizer/resolved_chart_id filter described in Using size guides.

  • Templates, Sizer loads its storefront markup through a theme-overridable loader. Copy any of templates/single-product/trigger.php, dialog.php or chart-table.php into your theme at yourtheme/sizer/single-product/<file>.php; the theme copy wins over the plugin’s. Overrides survive plugin updates.
  • CSS, the storefront stylesheet is built on custom properties so you can re-theme without touching markup. On the trigger: --sizer-accent, --sizer-accent-ink, --sizer-accent-contrast, --sizer-tape and --sizer-radius. On the dialog: --sizer-dialog-bg, --sizer-dialog-fg, --sizer-border and --sizer-head-bg. A prefers-color-scheme: dark block re-points the dialog colours, and entry animations and the size-row highlight are gated behind prefers-reduced-motion: no-preference.

A few behaviours are deliberately not settings, so the guide stays correct:

  • The button is always rendered on woocommerce_after_add_to_cart_button at priority 15, there is no placement option.
  • The trigger is always a styled button (.sizer-trigger--button); there is no text-link variant.
  • The chart always opens in a native <dialog> modal; there is no inline product-tab display.
  • A product with no assigned chart renders nothing at all.

Settings live in sizer_settings, charts in sizer_charts, and a schema marker in sizer_db_version. Per-product assignments live in the _sizer_chart_id post meta. Deleting the plugin runs the uninstall routine, which removes the three options but leaves the post meta in place, so reinstalling keeps your existing per-product assignments. Everything stays in your own database.