^

2019-03-17

^

WordPress教程:删除WooCommerce默认设置

删除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文件的底部。

关于作者:小朱笔记

小朱个人博客,生活网络分享,外贸建站,谷歌seo操作分享,B2B优化排名操作分享,资源分享,软件分享,生活分享。https://www.zhudc.com/

0 条评论

提交评论

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

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