{"id":30089,"date":"2025-01-03T00:13:04","date_gmt":"2025-01-03T00:13:04","guid":{"rendered":"https:\/\/www.s-sols.com\/?post_type=doc&#038;p=30089"},"modified":"2025-01-03T11:10:15","modified_gmt":"2025-01-03T11:10:15","slug":"kb-accel","status":"publish","type":"doc","link":"https:\/\/www.s-sols.com\/docs\/wordpress\/accelerator\/kb-accel","title":{"rendered":"Knowledge base Accelerator for WordPress"},"content":{"rendered":"<h2><a id=\"ultimate_addons_for_gutenberg\"><\/a>Spectra<br \/>\n<\/h2>\n<p style=\"text-align:justify\">\n  The plugin can be gotten <a href=\"https:\/\/wordpress.org\/plugins\/ultimate-addons-for-gutenberg\/\" rel=\"nofollow noopener\" target=\"_blank\">here<\/a>. Assets file generation as separated files should be disabled.\n<\/p>\n<h2><a id=\"woocommerce_currency_switcher\"><\/a>FOX &#8211; Currency Switcher Professional for WooCommerce<br \/>\n<\/h2>\n<p style=\"text-align:justify\">\n  The plugin can be gotten <a href=\"https:\/\/wordpress.org\/plugins\/woocommerce-currency-switcher\/\" rel=\"nofollow noopener\" target=\"_blank\">here<\/a>.\n<\/p>\n<p style=\"text-align:justify\">\n  To correct switching behavior:\n<\/p>\n<ul>\n<li style=\"text-align:justify\">\n    Set the &#8216;Settings&#8217; -&gt; &#8216;Options&#8217; -&gt; &#8216;Currency storage&#8217; to &#8216;Transient&#8217; (only if &#8216;FOX Session&#8217; doesn\u2019t work).\n  <\/li>\n<li style=\"text-align:justify\">\n    Add <code>@^wccs_changed_currency$@<\/code> to <a href=\".\/settings-users-accel#dep_grp_cookies\">cookies part in user cache group<\/a> named &#8216; WooCommerce&#8217;.\n  <\/li>\n<li style=\"text-align:justify\">\n    Insert the next HTML code at the bottom inside of <code>body<\/code> tag by any code snippet plugin (e.g. <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\" rel=\"nofollow noopener\" target=\"_blank\">Code Snippets<\/a>):\n  <\/li>\n<\/ul>\n<p><code class=\"p\">&lt;script seraph-accel-crit=\"1\"&gt;<br \/>(<br \/>\tfunction( d )<br \/>\t{<br \/>\t\tfunction _getCookie( name )<br \/>\t\t{<br \/>\t\t\tvar m = d.cookie.match( new RegExp( '(^| )' + name + '=([^;]+)' ) );<br \/>\t\t\treturn ( m ? m[2] : \"\" );<br \/>\t\t}<br \/><span style=\"display:inline-block;height:1em\"><span style=\"display:none\">.<\/span><\/span><br \/>\t\tfunction _setCookie( name, v )<br \/>\t\t{<br \/>\t\t\t\/\/ Set the cookie with a path to make it accessible site-wide<br \/>\t\t\tvar expires = new Date();<br \/>\t\t\texpires.setTime( expires.getTime() + 365 * 24 * 60 * 60 * 1000 ); \/\/ 1 year expiration<br \/>\t\t\td.cookie = name + '=' + v + ';path=\/;SameSite=Lax;expires=' + expires.toUTCString();<br \/>\t\t}<br \/><span style=\"display:inline-block;height:1em\"><span style=\"display:none\">.<\/span><\/span><br \/>\t\t\/\/ Implementation for '.woocommerce-currency-switcher' control<br \/>\t\td.querySelectorAll( \"select[name=\\\"woocommerce-currency-switcher\\\"]\" ).forEach(<br \/>\t\t\tfunction( e )<br \/>\t\t\t{<br \/>\t\t\t\te.addEventListener( \"change\",<br \/>\t\t\t\t\tfunction()<br \/>\t\t\t\t\t{<br \/>\t\t\t\t\t\t_setCookie( \"wccs_changed_currency\", _getCookie( \"wccs_init_currency\" ) == this.value ? \"\" : this.value );<br \/>\t\t\t\t\t}<br \/>\t\t\t\t);<br \/><span style=\"display:inline-block;height:1em\"><span style=\"display:none\">.<\/span><\/span><br \/>\t\t\t\tif( !_getCookie( \"wccs_init_currency\" ) )<br \/>\t\t\t\t\t_setCookie( \"wccs_init_currency\", e.value );<br \/>\t\t\t}<br \/>\t\t);<br \/><span style=\"display:inline-block;height:1em\"><span style=\"display:none\">.<\/span><\/span><br \/>\t\t\/\/ Implementation for '.woocs-style-1-dropdown' control<br \/>\t\td.querySelectorAll( \".woocs-style-1-dropdown\" ).forEach(<br \/>\t\t\tfunction( e )<br \/>\t\t\t{<br \/>\t\t\t\tvar curValText = e.querySelector( \".woocs-style-1-select &gt; span\" );<br \/>\t\t\t\tif( curValText )<br \/>\t\t\t\t\tcurValText = curValText.textContent;<br \/><span style=\"display:inline-block;height:1em\"><span style=\"display:none\">.<\/span><\/span><br \/>\t\t\t\te.querySelectorAll( \".woocs-style-1-dropdown-menu li\" ).forEach(<br \/>\t\t\t\t\tfunction( eItem )<br \/>\t\t\t\t\t{<br \/>\t\t\t\t\t\tif( eItem.textContent == curValText &amp;&amp; !_getCookie( \"wccs_init_currency\" ) )<br \/>\t\t\t\t\t\t\t_setCookie( \"wccs_init_currency\", eItem.getAttribute( \"data-currency\" ) );<br \/><span style=\"display:inline-block;height:1em\"><span style=\"display:none\">.<\/span><\/span><br \/>\t\t\t\t\t\teItem.addEventListener( \"click\",<br \/>\t\t\t\t\t\t\tfunction()<br \/>\t\t\t\t\t\t\t{<br \/>\t\t\t\t\t\t\t\tvar vCur = this.getAttribute( \"data-currency\" );<br \/>\t\t\t\t\t\t\t\t_setCookie( \"wccs_changed_currency\", _getCookie( \"wccs_init_currency\" ) == vCur ? \"\" : vCur );<br \/>\t\t\t\t\t\t\t}<br \/>\t\t\t\t\t\t);<br \/>\t\t\t\t\t}<br \/>\t\t\t\t);<br \/>\t\t\t}<br \/>\t\t);<br \/>\t}<br \/>)( document );<br \/>&lt;\/script&gt;<\/code>\n<\/p>\n<p style=\"text-align:justify\"><strong>Warning:<\/strong> Server or cloud caching should be disabled if &#8216;wccs_changed_currency&#8217; cookie is not empty.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spectra The plugin can be gotten here. Assets file generation as separated files should be disabled. FOX &#8211; Currency Switcher Professional for WooCommerce The plugin can be gotten here. To correct switching behavior: Set the &#8216;Settings&#8217; -&gt; &#8216;Options&#8217; -&gt; &#8216;Currency storage&#8217; to &#8216;Transient&#8217; (only if &#8216;FOX Session&#8217; doesn\u2019t work). Add @^wccs_changed_currency$@ to cookies part in&#8230;<\/p>\n","protected":false},"author":18,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"rank_math_lock_modified_date":false},"categories":[816],"tags":[916,611,609,92],"class_list":["post-30089","doc","type-doc","status-publish","hentry","category-accelerator","tag-kb","tag-knowledge-base","tag-support","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/doc\/30089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/doc"}],"about":[{"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/types\/doc"}],"author":[{"embeddable":true,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/comments?post=30089"}],"wp:attachment":[{"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/media?parent=30089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/categories?post=30089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/tags?post=30089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}