Merge pull request #27610 from attitude/patch-1

Encapsulate scope of `c` variable
This commit is contained in:
Rodrigo Primo 2020-09-11 14:27:06 -03:00 committed by GitHub
commit d7b2207e75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -348,9 +348,11 @@ function wc_body_class( $classes ) {
function wc_no_js() {
?>
<script type="text/javascript">
var c = document.body.className;
c = c.replace(/woocommerce-no-js/, 'woocommerce-js');
document.body.className = c;
(function () {
var c = document.body.className;
c = c.replace(/woocommerce-no-js/, 'woocommerce-js');
document.body.className = c;
})()
</script>
<?php
}