このユーザーにはお気に入りのトピックがありません。
お気に入りのフォーラムトピック
作成したフォーラムトピック
| ステータス |
トピック
|
サポーター | 声 | 投稿 | 新着度 |
|---|---|---|---|---|---|
|
nitropack and multi-currency
開始者:andersE-18
カテゴリ:English Support
Problem: Solution: function wcml_set_custom_currency_cookie( $currency = false ) {<br />if ( is_admin() && !( defined('DOING_AJAX') && DOING_AJAX ) )<br />return;<br />if ( !empty( $currency ) ) {<br />setcookie('wcml_custom_currency_cookie', $currency, time() + 60*60*24*7, '/');<br />return;<br />}<br />if ( empty( $_COOKIE['wcml_custom_currency_cookie'] ) && function_exists( 'get_woocommerce_currency' ) ) {<br />setcookie('wcml_custom_currency_cookie', get_woocommerce_currency(), time() + 60*60*24*7, '/');<br />}<br />}<br />add_action('wcml_switch_currency', 'wcml_set_custom_currency_cookie');<br />add_action('init', 'wcml_set_custom_currency_cookie');4) We advised the client to add this code to their functions.php file and to ask NitroPack how to exclude the 'wcml_custom_currency_cookie' from caching. If this solution does not seem relevant to your situation, please open a new support ticket with us. |
|
2 | 7 | 4年、 2ヶ月前 |