wc_no_js()WC 3.4.0

NO JS handling.

No Hooks.

Return

null. Nothing (null).

Usage

wc_no_js();

Changelog

Since 3.4.0 Introduced.

wc_no_js() code WC 8.7.0

<?php
function wc_no_js() {
	$type_attr = current_theme_supports( 'html5', 'script' ) ? '' : " type='text/javascript'";
	?>
	<script<?php echo $type_attr; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
		(function () {
			var c = document.body.className;
			c = c.replace(/woocommerce-no-js/, 'woocommerce-js');
			document.body.className = c;
		})();
	</script>
	<?php
}