• Resolved paulstav

    (@paulstav)


    Hello,

    I was initially having trouble saving the settings for the Google Universal Analytics page, however I figured out that it will allow me to save if I disable the WPML plugin.

    After fixing this issue, I enabled the new woocommerce tracking setting, and I get the message require "woo_code.php"; at the top of every page.

    Also, when I attempt to add a product to my cart to test the tracking, I receive the following error:

    Warning: Cannot modify header information - headers already sent by (output started at /home/.../wp-content/themes/themename/functions.php:139) in /home/.../wp-includes/pluggable.php on line 1211;

    It will not allow me to add anything to my cart, and I’m not sure if it’s actually tracking these events.

    What am I doing wrong? Thanks in advance.

    https://wordpress.org/plugins/google-universal-analytics/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Audrius Dobilinskas

    (@audriusd-1)

    Hi,

    Can you uncheck ‘WooCommerce tracking’ in the settings, save it, then once again re-enable it? Let me know if that solves the issue.

    — Audrius

    Thread Starter paulstav

    (@paulstav)

    Hey Audrius,

    I have tried disabling and re-enabling the setting numerous times, and also tried deactivating, deleting the plugin, and reinstalling it. The error continues to occur.

    I still receive this error when attempting to add products to my cart.

    require “woo_code.php”;
    Warning: Cannot modify header information – headers already sent by (output started at /home/…/wp-content/themes/theme1499/functions.php:140) in /home/…/pluggable.php on line 1121

    And require "woo_code.php"; shows up at the top of every page, including admin pages. Is this some sort of compatibility issue with WPML? The error occurs whether or not I have WPML enabled, however the plugin will not allow me to save changes while WPML is enabled.

    – Paul

    Thread Starter paulstav

    (@paulstav)

    Hi Audrius,

    I’ve gotten one step closer to the solution.. I noticed when I enable the WooCommerce setting, it adds the following line to the end of functions.php in my theme folder:

    require “woo_code.php”;

    Followed by a blank space. Currently my functions.php file ends in the following line of code:

    <?php } ?>

    So when the plugin adds require "woo_code.php";it’s breaking the functions.php. I’ve managed to manually fix the issue in my functions.php by changing the final line to the following:

    <?php require “woo_code.php”; } ?>

    However as far as I can tell, I don’t think the ecommerce is actually being tracked. Your help is greatly appreciated.

    –Paul

    Plugin Author Audrius Dobilinskas

    (@audriusd-1)

    Hello Paul,

    Thanks for the details.

    I cannot identify the issue with the WooCommerce tracking yet, so I am reverting plugin back to older version until I get it resolved. Check plugin settings, there should be an update waiting.

    I will let you know if I find a fix for this!

    — Audrius

    Plugin Author Audrius Dobilinskas

    (@audriusd-1)

    Hello Paul,

    There is 2.3.0.2 version now available. Can you check it out and verify that it solves the issue?

    — Audrius

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

The topic ‘require "woo_code.php"; when enabling woocommerce tracking’ is closed to new replies.