Woocommerce 根据不同语言设置不同支付方式

// Checks if the selected language is zh-hans, remove cheque.
function wpml_filter_gateways($gateways){

    if(ICL_LANGUAGE_CODE == 'zh-hans')
         unset($gateways['cheque']);

    return $gateways; //returns the other payment methods.
}
add_filter('woocommerce_available_payment_gateways','wpml_filter_gateways',1);

128 total views, 2 views today

Revisions

Comments are closed.