Thread Starter
marscj
(@marscj)
Thread Starter
marscj
(@marscj)
add_filter( ‘script_loader_tag’, ‘tec_fix_filter_modify_to_module’, 10, 2 );
function tec_fix_filter_modify_to_module( $tag, $handle ) {
if (
‘tec-ky-module’ !== $handle
&& ‘tec-ky’ !== $handle
&& ‘tec-tickets-commerce-gateway-stripe-checkout’ !== $handle
) {
return $tag;
}
// These themes already have the type='text/javascript' added by WordPress core.
if ( ! current_theme_supports( ‘html5’, ‘script’ ) ) {
$replacement = ‘type=”module”‘;
return str_replace( “type=’text/javascript'”, $replacement, $tag );
}
$replacement = ‘<script type=”module” ‘;
return str_replace( ‘<script ‘, $replacement, $tag );
}
this is worked
Hi @marscj,
Thanks for reaching out to us.
Indeed, that’s a known issue we’ve listed on our known issues page.
You’ve applied the proper patch to fix it, and we’ll be solving this one in the upcoming release pretty soon.
Thanks for reporting. I’ll be marking this one as resolved.
Have a wonderful day,
Juan.