• Resolved optimalisatie

    (@optimalisatie)


    First of all, thanks for the great plugin!

    I hereby want to report a bug.

    /woocommerce-google-dynamic-retargeting-tag/wgdr.php (line 312)

    ecomm_totalvalue: <?php echo $woocommerce->cart->cart_contents_total; ?>

    When the variable $woocommerce->cart->cart_contents_total is empty a javascript error is triggered.

    The variable should be enclosed in quotes to make it safe.

    ecomm_totalvalue: '<?php echo $woocommerce->cart->cart_contents_total; ?>'

    You could also force a variable type, e.g. floatval.

    https://www.ads-software.com/plugins/woocommerce-google-dynamic-retargeting-tag/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author alekv

    (@alekv)

    Hi Optimalisatie.nl

    I plan to fix this in the next few days. Could you please tell me where you have seen this error? In the Firefox dev console?

    Thanks
    Aleks

    Plugin Author alekv

    (@alekv)

    Closing this issue because of a missing response and necessary details about the bug.

    The issue can be reopened by the user with a new ticket.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘empty JSON causes javascript error’ is closed to new replies.