Linux 软件免费装

Bmnh Add to Cart Text Changer for WooCommerce

开发者 bmnazmul
更新时间 2026年2月11日 02:58
PHP版本: 7.4 及以上
WordPress版本: 6.9
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce add to cart customization button label button text

下载

1.0 1.0.1 1.0.2

详情介绍:

Add to Cart Text Change Nh lets you change the text of WooCommerce "Add to cart" buttons site-wide (archive/shop) and on single product pages. Lightweight, dependency-free, and safe for themes — ideal when you want a different call-to-action like "Buy Now", "Order Today" or a translated label.

安装:

  1. Upload the 'bmnh-add-to-cart-text-change' folder to the '/wp-content/plugins/' directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. The plugin replaces button text using its built-in defaults. To customize the text, see the FAQ/Usage section below.

升级注意事项:

1.0.2 Initial stable release with settings framework support.

常见问题:

How do I change the default button text?

You can change the default text in two ways:

  1. Add filters in your theme's functions.php (recommended, upgrade-safe): ```php // Change archive/shop add-to-cart text add_filter( 'woocommerce_product_add_to_cart_text', function() { return 'Buy Now'; } );
// Change single product add-to-cart text add_filter( 'woocommerce_product_single_add_to_cart_text', function() { return 'Order Today'; } ); ```
  1. Edit the plugin files directly (not recommended for upgrades).

Can I change the label per product or per category?

Yes — not in a UI, but you can add conditional logic inside the filter callbacks and check product/category to return different labels.

Will this work with my theme and other WooCommerce plugins?

Yes — the plugin uses standard WooCommerce filters. If another plugin or your theme overrides the same filters at a later priority, adjust the priority or add your filter with a later priority.

更新日志:

1.0.2 1.0.1