Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 dokan 插件,并希望将国家/地区选择限制为运输页面和设置页面中的一个。我从 woocommerce i18n 文件夹 country.php 中删除了其他国家,但没有任何变化。
您可以使用 WooCommerce 国家/地区过滤器来实现此结果。
add_filter( 'woocommerce_countries', 'rt_modify_country_list' ); function rt_modify_country_list( $countries ){ $countries = array( 'BD' => 'Bangladesh', 'CN' => 'China' ); return $countries; }
谢谢