替换“Free!”产品字符串
- /**
- * WooCommerce Extra Feature
- * --------------------------
- *
- * Replace "Free!" by a custom string
- *
- */
- function woo_my_custom_free_message() {
- return "This product is FREE!";
- }
- add_filter('woocommerce_free_price_html', 'woo_my_custom_free_message');
在哪里添加此代码?
将PHP代码放在主题或子主题functions.php文件的底部。