2017-07-26 67 views
0

我使用dokan插件,並希望限制國家選擇只在一個在航運頁面和設置頁面。我從woocommerce i18n文件夾countries.php中刪除了其他國家,但沒有任何更改。限制國家剛剛在dokan插件

回答

0

您可以使用WooCommerce國家/地區過濾器來實現此結果。

add_filter('woocommerce_countries', 'rt_modify_country_list'); 

function rt_modify_country_list($countries){ 

    $countries = array(
     'BD' => 'Bangladesh', 
     'CN' => 'China' 
    ); 

    return $countries; 
} 

感謝