Created
May 28, 2025 08:58
-
-
Save webtoffee-git/d273aa1c0c015ff5179acecf21273c0f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Do not copy this line of code | |
add_action('wp_footer', function () { | |
if (is_product()) { | |
?> | |
<script> | |
jQuery(document).ready(function () { | |
const container = jQuery('.wt-related-products'); | |
if (container.length > 0) { | |
const h2 = container.find('.wt-crp-heading'); | |
if (h2.length) { | |
const h3 = jQuery('<h3>', { | |
class: h2.attr('class'), | |
style: h2.attr('style'), | |
html: h2.html() | |
}); | |
h2.replaceWith(h3); | |
} | |
} | |
}); | |
</script> | |
<?php | |
} | |
}, 20); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment