Linux 软件免费装
Banner图

Sale & Stock Badges for WooCommerce

开发者 motylanogha
更新时间 2026年7月31日 17:44
PHP版本: 8.1 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce new badge sale badge product badges low stock

下载

1.0.9 1.0.10 1.0.11 1.0.13 1.0.14 1.0.15

详情介绍:

Sale & Stock Badges puts badges on your WooCommerce products. Some appear on their own from each product's current state (Sale, New, Low stock, Bestseller, and a few others), and you can also set one manual badge per product using a store-wide label and colour. The badges are drawn with CSS and sit over the product image, so they add no JavaScript and don't shift the layout when the page loads. They show on the single product page and on shop, category and tag listings. The code is open and lives on GitHub if you want to read it, file a bug or send a patch. Configuration lives under a top-level Sale & Stock Badges admin menu: a global on/off toggle, placement controls, per-rule toggles with custom labels, thresholds, an appearance section (shape, uppercase, per-context caps) and the manual badge label and colour. Settings are sanitised and clamped on save. Documentation and links Features The [marks_badges] shortcode Use [marks_badges] to drop a product's badges into any page, post or widget. With no attributes it uses the current product (inside a loop or on a single product page). Pass id to target a specific product and context (single or loop) to pick the render style: [marks_badges id="123" context="loop"]

安装:

  1. Upload the plugin to /wp-content/plugins/marks, or install via Plugins → Add New.
  2. Activate it. WooCommerce must be active.
  3. Go to the Sale & Stock Badges menu, enable badges, and choose which automatic badges to show.

屏幕截图:

  • The Sale & Stock Badges settings screen.

常见问题:

Does it require WooCommerce?

Yes.

When does the "New" badge show?

On products created within the newness window (30 days by default).

When does the "Low stock" badge show?

On stock-managed products whose remaining quantity is at or below the configured low-stock threshold.

How do I add a manual badge to a single product?

Set the manual badge label and colour on the Sale & Stock Badges settings screen, then set the product meta _marks_manual_text (and optionally _marks_manual_style) on the products that should display it.

Does this plugin work on WordPress Multisite?

Yes. This plugin is compatible with WordPress Multisite. Network activate it or activate it on individual sites; each site keeps its own settings and data.

更新日志:

1.0.15 1.0.13 1.0.12 1.0.11 1.0.10 1.0.9 1.0.8 1.0.7 1.0.6 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 0.3.1 0.3.0 0.2.0 0.1.0