月存档七月 2017

主页|2017|七月

wpml多语言国旗设置

访问链接 WPML->Languages->Edit languages, they will always be resized to 18x12px. Please stick to the flags uploaded manually via FTP to the 上传文件到 wp-content/plugins/sitepress-multilingual-cms/res/flags 目录。 国旗图片下载 https://www.countryflags.com/en/united-states-flag-image.html   function language_selector_flags(){ if(function_exists('icl_get_languages')) { $languages = icl_get_languages('skip_missing=0&orderby=code'); if(!empty($languages)){ foreach($languages as $l){ if(!$l['active']) echo '<a href="'.$l['url'].'">'; echo '<img src="'.$l['country_flag_url'].'" height="16" alt="'.$l['language_code'].'" width="24" />'; if(!$l['active']) echo '</a>'; } } }

|2017-07-17T21:37:48+08:00七月 17th, 2017|WooCommerce建站|wpml多语言国旗设置已关闭评论

添加港币HK$中的HK符号

我们都知道woocommerce默认的港币符号只是$,跟美金容易混淆 //添加港币HK符号 add_filter('woocommerce_currency_symbol', 'add_my_currency_symbol', 10, 2); function add_my_currency_symbol( $currency_symbol, $currency ) { switch( $currency ) { case 'HKD': $currency_symbol = 'HK$'; break; } return $currency_symbol; } 参考 https://github.com/woocommerce/woocommerce/issues/1114 https://wpml.org/forums/topic/want-to-change-the-hong-kong-dollar-currency-symbol-from-to-hk/  

|2017-07-12T23:28:50+08:00七月 12th, 2017|WooCommerce建站|添加港币HK$中的HK符号已关闭评论