Configuration
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Nudge is configured on one screen: WooCommerce → Nudge (capability manage_woocommerce). Everything is stored in a single option, nudge_settings (an array), merged over the packaged defaults. The screen has three sections.
General
Section titled “General”Enable Nudge
Section titled “Enable Nudge”Option key: enabled (default on). The master switch. When off, the bar never renders and no Nudge styles or scripts are enqueued on the front end, the assets are registered only when the bar is enabled and actually loaded when a bar is about to render, so a page without a bar stays clean.
Cart page / Checkout page
Section titled “Cart page / Checkout page”Option keys: show_on_cart, show_on_checkout (both default on). Choose where the bar appears. You can show it on cart only, checkout only, both, or neither. On the classic cart the bar renders above the totals (woocommerce_before_cart_totals); on classic checkout it renders before the form (woocommerce_before_checkout_form). The same service also hooks the Cart and Checkout Blocks via woocommerce_cart_totals_after_order_total and woocommerce_review_order_after_order_total, so the bar appears in both the classic and block templates without extra setup.
Free-shipping threshold
Section titled “Free-shipping threshold”Threshold source
Section titled “Threshold source”Option key: threshold_source, auto (default) or manual.
- Automatic, Nudge inspects every shipping zone (plus the “rest of the world” zone) for an enabled
free_shippingmethod whose requirement is A minimum order amount, …or a coupon, or …and a coupon, and uses the smallest minimum order amount it finds. Change that rule and the bar follows it; there is no figure to keep in sync by hand. A free-shipping method that requires only a coupon exposes no amount to count down to and is ignored. - Manual, Nudge uses the fixed amount below and ignores shipping methods entirely.
If Automatic finds no qualifying method, it falls back to the manual amount, so the bar still works while you finish configuring shipping. If the resolved threshold is zero or less, there is no goal to show and the bar hides itself.
Manual amount
Section titled “Manual amount”Option key: manual_threshold (default 50). In your store currency, before shipping and taxes. Used when the source is Manual, and as the fallback for Automatic. Saved values are run through wc_format_decimal and clamped to zero or above.
The cart total measured against the threshold is the cart contents total, items only, before shipping, minus discounts, matching how WooCommerce itself evaluates a free-shipping minimum order amount. The bar’s percentage therefore tracks the same figure a shopper would need to hit to qualify at checkout.
Messages
Section titled “Messages”Both messages are plain text, sanitised with sanitize_text_field on save (the {amount} token is preserved). Leave a field blank to use the packaged default.
Progress message
Section titled “Progress message”Option key: message_progress (default Add {amount} more to get free shipping!). Shown while the cart is below the goal. Write {amount} where the remaining total should appear, it is replaced with the value formatted in your store currency via wc_price() (for example $12.00). The live preview under the field shows the wording with a sample amount.
Success message
Section titled “Success message”Option key: message_success (default You have unlocked free shipping!). Shown once the cart reaches or exceeds the goal. The {amount} token is not substituted here, because there is no remaining amount to show.
Colours and sizing
Section titled “Colours and sizing”There is no colour picker in the admin, the live preview shows message text only. The bar’s colours, track height, radius, gap and font size are all --nudge-* CSS custom properties on the .nudge element, so you restyle it from your theme’s CSS or with inline styles rather than from a setting. See Using the bar → Theming the colours for the full token list. The bar is dark-mode aware (prefers-color-scheme) and the fill animation respects prefers-reduced-motion.
What is fixed by design
Section titled “What is fixed by design”A few behaviours are deliberately not settings:
- The bar hides itself when the feature is off, the cart is empty, or no free-shipping threshold is configured, it never renders an always-complete or empty bar.
- Accessibility markup (
role="progressbar", thearia-livemessage region) is always present and is not configurable.
Storage and uninstall
Section titled “Storage and uninstall”Nudge stores only two options, nudge_settings and nudge_db_version, and creates no custom tables or post meta. Deleting the plugin from the Plugins screen runs the uninstall routine, which removes both options.