• Resolved slnikohamalainen

    (@slnikohamalainen)


    Hi,
    I noticed that WooCommerce Carrier Agents plugin script breaks when “Facebook For WooCommerce” addon is enabled.

    After debugging I discovered that cookiebot_addons_manipulate_script function closes self-closing tags incorrectly with </script> tag.

    $normalized_buffer = preg_replace( '/(<script(.*?)\/>)/is', '<script$2></script>', $buffer );

    Example from WooCommerce Carrier Agents plugin:

    <script type="text/html" id="tmpl-woo-carrier-agent">
      <div class="woo-carrier-agent">
        <div class="woo-carrier-agent-radio">
          <input type="radio" value="{{ data.agent.id }}" name="carrier-agent[{{ data.instance_id }}]" id="carrier-agent-{{ data.instance_id }}-{{ data.agent.id }}" />
          <code>data.agent.hidden_fields</code>
        </div>
        <# if ( data.agent.logo_url && data.agent.logo_url.length > 0 ) { #>
          <div class="woo-carrier-agent-logo"><img src="{{ data.agent.logo_url }}" /></div>
        <# } #>
        <div class="woo-carrier-agent-info">
          <div class="woo-carrier-agent-name">{{ data.agent.title }}</div>
          <div class="woo-carrier-agent-address">{{ data.agent.street_address }}, {{ data.agent.postcode }} {{ data.agent.city }}</div>
        </div>
      </div>
    </script>
Viewing 1 replies (of 1 total)
  • Hi,

    Did you initiate a fresh scan after enabling the plugin?

    Are you using W3 Total Cache plugin or any optimizer plugins like Siteground and Rocket?

    Have you tried to use the “Facebook for commerce” script instead of WP plugin?

    Can you please create a support if the issue persist as we may need to look into it furthermore?
    https://support.cookiebot.com/hc/en-us/requests/new

    Best wishes,
    Cookiebot support

Viewing 1 replies (of 1 total)
  • The topic ‘Issue with WooCommerce Carrier Agents plugin’ is closed to new replies.