Home › Forums › WoodMart support forum › Product videos are not working › Reply To: Product videos are not working
April 16, 2024 at 11:57 am
#557628
Luke Nielsen
Keymaster
Hello,
Please add the following code in the “On document ready” area in Theme Settings -> Custom JS:
if ( document.querySelector('.woocommerce-product-gallery .wd-carousel-item.wd-with-video') ) {
const tag = document.createElement( 'script' );
tag.src = '//www.youtube.com/iframe_api';
const firstScriptTag = document.getElementsByTagName( 'script' )[0];
firstScriptTag.parentNode.insertBefore( tag, firstScriptTag );
}
Then clear the cache and recheck the issue. Let me know the result.
Kind Regards