Linux 软件免费装
Banner图

Sold Out Badge for WooCommerce

开发者 charlieetienne
更新时间 2023年5月31日 03:26
PHP版本: 7.2 及以上
WordPress版本: 6.2
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce badge out of stock sold out wcsob

下载

2.0.10 2.0.5 4.1.0 4.3.6 4.4.0 2.0.4 4.2.0 4.3.0 2.2.0 3.0.0 3.0.1 3.2.0 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 3.2.1 3.1.0 3.2.2 4.0.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5

详情介绍:

Display a "Sold Out!" badge on out-of-stock products. When a WooCommerce product becomes out of stock, this plugin will show a badge on thumbnail with the text you will have defined. This plugin was initially created to help people and companies selling unique products or services, like artists, artisans, real estate professionals, etc. It is often beneficial for them to keep showing sold out (out of stock) products on their websites, while displaying a message indicating that the product can't be sold anymore. However, this plugin can be used by anyone wanting to display any text in a badge when a product is out of stock. It is also possible to display a badge on backorder products.

安装:

  1. Install this plugin either via the WordPress.org plugin directory, or by uploading the files to your server.
  2. Activate the plugin.
  3. That's it. You're ready to go! Please, refer to the Usage & Documentation section for examples and how-to information.

屏幕截图:

  • Store and categories pages
  • Admin settings

常见问题:

Is this plugin completely free?

Yes.

Can I use this plugin for commercial purposes?

Sure, go ahead! It is completely open source.

Can I change the badge text?

Yes. Go to Settings > Sold Out Badge for WooCommerce, you'll find the setting you want.

What if this plugin isn't compatible with my theme or doesn't work?

You could uninstall this plugin and try to get the badge manually. There are two ways you could do it: 1. Pure CSS If you're lucky enough, you'll have a specific CSS class for out-of-stock products. You could add a SOLD OUT badge like this: css .product.outofstock:before { content: 'SOLD OUT'; color: #ffffff; background: #FE2121; font-size: 16px; padding: 4px; font-weight: bold; width: auto; height: auto; border-radius: 0; z-index: 9999; text-align: center; position: absolute; top: 6px; right: auto; bottom: auto; left: 6px; } 2. PHP + CSS Otherwise, you could use WP hooks to add a badge. Put this code in your child theme's functions.php: ```php add_action( 'woocommerce_before_shop_loop_item_title', 'my_custom_soldout_badge_display', 10 ); add_action( 'woocommerce_before_single_product_summary', 'my_custom_soldout_badge_display', 30 ); function my_custom_soldout_badge_display() { global $post, $product; if ( ! $product->is_in_stock() ) { echo 'SOLD OUT'; } } ``` Use the following CSS code to style the badge: css .wcsob_soldout { content: 'SOLD OUT'; color: #ffffff; background: #FE2121; font-size: 16px; padding: 4px; font-weight: bold; width: auto; height: auto; border-radius: 0; z-index: 9999; text-align: center; position: absolute; top: 6px; right: auto; bottom: auto; left: 6px; }

更新日志:

4.4.0 4.3.6 4.3.5 4.3.4 4.3.1 4.3.0 4.2.0 4.1.0 4.0.0 3.2.2 3.2.1 3.2.0 3.1.0 3.0.1 3.0.0 2.2.0