• Resolved stepfaul

    (@stepfaul)


    Hi, I am trying to add the following code to the head section and the id shown in bold below is being stripped out please can you help?

    <!-- BEGIN MerchantWidget Code -->

    <script id='merchantWidgetScript'

    src="https://www.gstatic.com/shopping/merchant/merchantwidget.js"

    defer>

    </script>

    <script type="text/javascript">

    merchantWidgetScript.addEventListener('load', function () {

    merchantwidget.start({

    position: 'RIGHT_BOTTOM'

    });

    });

    </script>

    <!-- END MerchantWidget Code -->

    I am running plugin version 1.53 and WordPress version 6.9.1

    Thanks in advance

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @stepfaul,

    Thank you so much for choosing Head & Footer Code for your project, and reporting the issue.

    I have released a new version 1.5.4 with a lot of improvements, including fix for the issue that you have reported.

    Please give it a try.

    Aleksandar

    @stepfaul forgot to note, you must use double quotes or no quotes for attribute values, otherwise they’ll be stripped. So, this is correct code snippet:

    <!-- BEGIN MerchantWidget Code -->
    <script id="merchantWidgetScript"
    src="https://www.gstatic.com/shopping/merchant/merchantwidget.js"
    defer>
    </script>
    <script type="text/javascript">
    merchantWidgetScript.addEventListener('load', function () {
    merchantwidget.start({
    position: 'RIGHT_BOTTOM'
    });
    });
    </script>
    <!-- END MerchantWidget Code -->
    Thread Starter stepfaul

    (@stepfaul)

    Hi @urkekg thank you for responding so quickly, I can confirm that the update does resolve the issue for me.

    Many thanks

    Steve.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.