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