wc_enqueue_js()WC 1.0

Deprecated since 0.4.0. It is no longer supported and may be removed in future releases. Use wp_add_inline_script() instead.

Queue some JavaScript code to be output in the footer.

No Hooks.

Returns

null. Nothing (null).

Usage

wc_enqueue_js( $code );
$code(string) (required)
Code.

Changelog

Deprecated since 10.4.0 Use wp_add_inline_script() instead.

wc_enqueue_js() code WC 10.7.0

function wc_enqueue_js( $code ) {
	global $wc_queued_js;

	wc_deprecated_function( 'wc_enqueue_js', '10.4.0', 'wp_add_inline_script' );

	if ( empty( $wc_queued_js ) ) {
		$wc_queued_js = '';
	}

	$wc_queued_js .= "\n" . $code . "\n";
}