Additional help for woocommerce products
-
Howdy,
Your plugin seemed to work for everything but woocommerce product images. I had to write a jquery script to catch the added issues. You can substitute your ip for x.x.x.x.
`<script type=”text/javascript”>
jQuery(document).ready(function($) {
$(‘[src*=”x.x.x.x”]’).each(function() {
var src = $(this).attr(‘src’);
var newSrc = src.replace(“x.x.x.x”,window.location.host);
$(this).attr(‘src’, newSrc);
});$(‘[href*=”x.x.x.x”]’).each(function() {
var h = $(this).attr(‘href’);
var newH = h.replace(“x.x.x.x”,window.location.host);
$(this).attr(‘href’, newH);
});$(‘[srcset*=”x.x.x.x”]’).each(function() {
var src = $(this).attr(‘srcset’);
var newSrc = src.replace(/x\.x\.x\.x/gi,window.location.host);
$(this).attr(‘srcset’, newSrc);
});
});
</script>I’m not sure if this helps or whether I just missed something. But this is working for me.
The topic ‘Additional help for woocommerce products’ is closed to new replies.