Notice
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
- Plugin page: https://plogins.com/notice/
- Documentation: https://plogins.com/notice/docs/
- Author: WPPoland.com
- WordPress.org contributor: motylanogha
- Source: https://github.com/wppoland/notice
Notice adds one announcement bar to the top of your WooCommerce store: a sale, a free-shipping threshold, a shipping cut-off or any store-wide message, with an optional call-to-action button and your own colours. Shoppers can close it, and the bar stays closed for them on later visits.
There is one settings screen, WooCommerce → Announcement Bar, with a live preview that updates as you type. The free edition is the full GPL product, not a trial with locked features.
What the free edition does
Section titled “What the free edition does”- One store-wide bar printed at the top of every front-end page.
- Message with a small safe-HTML allow-list,
<strong>,<em>,<a>,<span>and<br>(anything else is stripped on save). - Optional CTA button with its own URL and an open-in-new-tab option (
rel="noopener noreferrer"is added for you). - Three colours, background, text and accent, driven by CSS custom properties, with a live preview.
- Dismissible with a configurable remember-for window; the choice lives in the visitor’s browser (
localStorage, no cookies, no personal data). - Auto re-show on a new message, editing the message text re-shows the bar to everyone who dismissed the old one.
- Accessible, an ARIA region, a keyboard-operable close button, focus-visible outlines and
prefers-reduced-motionsupport.
How the bar renders
Section titled “How the bar renders”The bar prints server-side at wp_body_open (priority 5), so it sits as high in the <body> as the theme allows, most modern themes fire this hook. It is position: sticky to the top of the viewport, so it stays in view as the shopper scrolls. The CSS loads only when the bar is active (enabled and has a non-empty message), and the dismissal script loads only when the bar is also dismissible, a disabled bar enqueues nothing.
The markup is plain HTML with no front-end framework and no jQuery. There is no layout shift beyond the bar’s own height.
Settings storage
Section titled “Settings storage”Everything is stored in a single option, notice_settings (an array), in your own database. Notice contacts no external service. Deleting the plugin runs the uninstall routine and removes notice_settings and notice_db_version.
For developers
Section titled “For developers”Notice resolves the bars it renders through the notice/bars filter, so a developer can register more than one bar from code, and notice/bar_active can narrow any bar’s visibility by page, role or segment. See Using the announcement bar for working examples.
Next steps
Section titled “Next steps”- Getting started, install, write your message, enable the bar.
- Configuration, every setting and its stored value.
- Using the announcement bar, message formatting, the CTA, dismissal and the developer filters.