{"id":7228050,"date":"2016-03-31T23:22:47","date_gmt":"2016-03-31T23:22:47","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/woocommerce-javascript-combination-problem\/"},"modified":"2016-08-31T15:19:03","modified_gmt":"2016-08-31T15:19:03","slug":"woocommerce-javascript-combination-problem","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/woocommerce-javascript-combination-problem\/","title":{"rendered":"Woocommerce javascript combination problem"},"content":{"rendered":"<p>Hi, i just found a problem with Woocommerce. When this plugin is set to combine javascript http:\/\/screencast.com\/t\/SJxIHZyxin8K then localized strings are not present. After hours of searching for solution, i have found it. In js-css-script-optimiser.php on line 98 is<\/p>\n<pre><code>add_action(&#039;wp_print_scripts&#039;,array(__CLASS__, &#039;wp_print_scripts_action&#039;), 0);\narray(__CLASS__, &#039;wp_print_scripts_action&#039;), 0);<\/code><\/pre>\n<p>But in woocommerce is hooked like this<\/p>\n<p><code>add_action( &#039;wp_print_scripts&#039;, array( __CLASS__, &#039;localize_printed_scripts&#039; ), 5 );<\/code><\/p>\n<p>So this localized strings are printed after all scripts are combined, resp. they are not visible at all. <\/p>\n<p>Could you just change priority of that to 200? Thank you.<\/p>\n<pre><code>add_action(&#039;wp_print_scripts&#039;,array(__CLASS__, &#039;wp_print_scripts_action&#039;), 200);\narray(__CLASS__, &#039;wp_print_scripts_action&#039;), 200);<\/code><\/pre>\n<p>https:\/\/wordpress.org\/plugins\/js-css-script-optimizer\/<\/p>\n","protected":false},"template":"","class_list":["post-7228050","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7228050","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7228050\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7228050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}