Anonco
- Plugin page: https://plogins.com/anonco/
- Documentation: https://plogins.com/anonco/docs/
- Author: WPPoland.com
- WordPress.org contributor: motylanogha
- Source: https://github.com/wppoland/anonco
Anonco 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. Anonco 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”Anonco 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.
Anonco Pro
Section titled “Anonco Pro”Anonco Pro needs the free Anonco plugin, version 0.1.3 or later. If it is missing, deactivated or older, PRO stays dormant and shows an admin notice.
| Screen | Purpose |
|---|---|
| WooCommerce > Announcement Bar | Free bar message, colours, CTA link and optional schedule. |
| WooCommerce > Announcement Bars | Up to five PRO bars with per-bar message, colours, CTA, dismissal and schedule. |
| WooCommerce > Announcement Analytics | Click and impression stats, role/geo/device targeting rules and A/B variant results. |
- Analytics store aggregate daily click counts for bar CTAs and message links, with no personal data and no custom table (
ClickTracker,ClickAnalytics), plus per-bar view and dismissal counts (ImpressionTracker). - Page, geo and device targeting narrow bars through
notice/bar_active(PageTargeting,GeoDeviceTargeting,VisitorContext). Country rules use Cloudflare country headers or WooCommerce geolocation when available. - Multiple bars are registered through
notice/bars(MultipleBars). - A/B testing assigns visitors to a variant with a cookie, so a visitor keeps seeing the same variant (
AbTesting).
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.
Free and PRO
Anonco Pro is a separate paid plugin that extends Anonco. The free edition is not a trial and its features stay available without a time limit.
| Feature | Free | PRO |
|---|---|---|
| Store-wide bar | Yes | Yes |
| Message with safe HTML | Yes | Yes |
| CTA button | Yes | Yes |
| Custom colours | Yes | Yes |
| Dismissal without cookies | Yes | Yes |
| CTA click analytics | - | Yes |
| Impression analytics | - | Yes |
| Page targeting | - | Yes |
| Multiple bars | - | Yes |
| A/B testing | - | Yes |
| Role targeting | - | Yes |
| Geo and device targeting | - | Yes |