WordPress教程:删除WooCommerce默认设置

经过 小朱笔记 | 3 月 17, 2019 | WordPress技巧 | 0条评论

删除WooCommerce默认设置

add_filter( 'woocommerce_catalog_settings', 'woo_remove_catalog_options' );
 
function woo_remove_catalog_options( $catalog ) {
 
  unset($catalog[23]); https://Trim zeros (no) 
  unset($catalog[22]); https://2 decimals 
  unset($catalog[21]); https://decimal sep (.) 
  unset($catalog[20]); https://thousand sep (,) 
  unset($catalog[19]); https://currency position (left)   
  unset($catalog[18]); https://currency position (left)   
  unset($catalog[5]); https:// ajax add to cart (no)  
 
  return $catalog; 
}

在哪里添加此代码?

将PHP代码放在主题或子主题functions.php文件的底部。

0条评论

提交评论

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理