How To Track the WooCommerce Logging (and the reasons why you should)

Jul 7, 2022
Learning how to track WooCommerce Logging

In the event that your store malfunctions or changes are happening without a clear source, these logs can aid in solving the issue.

Are you curious about what's happening in the WooCommerce back end? Let's set up logging in WooCommerce so that you are aware of exactly what's happening in your back end throughout the day.
   

What exactly is WooCommerce Logging?

The events that occur are then compiled into a log file that can be used for simple viewing. It is not necessary to keep an check on logs of activity, however, when your website begins getting a little agitated or your setting seemingly changes on its own this can be helpful to have access to them.

But these logs can confuse, mislead, or needlessly concern beginners who aren't sure how to troubleshoot, which is why the majority of these programs turn them off on default.

Logs of WooCommerce Activity Logs

Logging activities is a feature thatis not built in WooCommerce in the default configuration but is extremely important. The logs track the changes to settings and who is responsible for them.

The WooCommerce activity log.
The WooCommerce activity record.

It will also tell the user who made the modification and the date it was made. You could be alerted when specific sensitive changes are made as well.

This is especially important if your website has multiple store managers. If an administrator changes an option they aren't expected to change, it may cause a lot of confusion. However, with the help of an activity log, you'll know immediately who made the switch.

However, even if you're running a store on your own this is still an essential aspect. There are times when you make changes with no intention, and an activity log can help you identify the issue and reverse it. In the event that you're hacked, you'll be able to quickly identify any unusual behavior.

WooCommerce does not come with activity-logging in its default settings, which means you'll have to install a plugin to activate this option.

WooCommerce Error Logs

In contrast to activity logs, WooCommerce includes error logs inbuilt. It captures two kinds of errors: fatal errors as well as more general PHP errors.

Fatal errors can be a devastating type of error due to faulty programming, which results the action not being fully. WooCommerce may use a function which doesn't exist, and then get caught in an endless code loop or even attempt to do something your server doesn't allow.

The general PHP error messages can be more insignificant. WordPress itself is built on PHP along with plugins such as WooCommerce. Errors crop up constantly on web pages, usually caused by incorrect syntax or small conflicts. Sometime, they cause obvious issues, and sometimes you don't even be able to notice any of them.

However, it's important to keep an eye on mistakes on your website, especially fatal errors. It could signal a problem which requires immediate fix.

Why You Should Monitor Your WooCommerce Logs

Although it might not have any impact the majority of the period, once something on your website breaks or unexplained changes start happening this can be an essential tool. The logs provide you with information about exactly what went wrong, at what time and in what location it is possible to find the cause and roll back any changes.

And if you keep an monitoring your logs making sure you check them regularly or setting up automated notifications will let you catch issues before they get out of control.

However, if you're keeping an eye on your logs, you'll be aware before anything damaging can happen. You'll always know right away the moment serious issues stop your site, the settings change, and even items or orders are changed.

Should your online store be compromised and hacked, it will be immediately obvious with a logged string of prices being drastically changed with descriptions being updated and whole products being deleted.

In the end, logging can help to ensure that you are GDPR compliant when you encounter certain circumstances. All activity log applications should include a way to give users access to the data about them that is required by the GDPR. WooCommerce also offers GDPR-related features integrated into it.

How Do You Track WooCommerce Activity Logging

You can install the plugin you want by clicking Plugins > Add New and then searching for the name or title. You can also download these plugins by clicking on their URL by uploading them via the Upload plugin button.

1. Activity Log

Activity Log plugin
Activity Log plugin

The appropriately named Activity Log plugin was created to monitor essential WordPress actions along with other plugins like WooCommerce. It's optimized well and uses its own database table, therefore you'll never experience delays.

The newly-created activity log menu at the top of your dashboard after you've downloaded it. The menu will be easy, straightforward menu that lists out every activity that's happening and what the users (and the IP behind them) are responsible for, and any additional details.

Activity Log in action
Activity Logs in action

The one downside is that it's not able to show exactly the changes that occurred in many cases, but only show that there was a change.

Want to know the ways we have increased visitors by 1000 per cent?

Join over 20,000 others to receive our newsletter every week with insider WordPress tricks!

It is also possible to alter the settings to save records for a long than a short time, or remove out of your database when they're taking up too much space.

In the end, it's the best choice for a logging plugin for those who just want an overview of everything that's going on in your store. There are no paywalled features and what you see is what you receive.

2. WP Activity Log + WP Activity Log for WooCommerce

WP Activity Log
WP Activity Log

The WP Activity Log helps you monitor more precisely what's happening on your site, and there's also a WooCommerce extension that provides even more information. Although some of the functions (email messages, log searches as well as compiled reports and more) are available only for premium, the customers who are free have access to an array of options.

When you've installed the plugin, take a look at the newly-created WordPress Activity Log menu in your dashboard. Utilize Log Viewer Log Viewer to see any logged events. You can also tweak Settings to control the settings in a more precise manner, as well as the enable/disable eventsmenu to record only the events you want. Under the category menu on this page, choose WooCommerce to narrow your search down to only store events.

The logs are extremely detailed, telling you exactly what has changed, along with typical information, such as the user's name and IP.

WP Activity Log offers detailed logs.
WP Activity Log offers detailed logs.

It's a complicated plugin that comes with a lot of settings and features, so if you want even more control over your records and the full details of the specifics of what's changed This is the plugin for you.

3. Simple The Story

Simple History plugin.
Simple History plugin.

Sometimes simple is the best approach to handle a web site. If you need an activity logger without any trouble, Simple History is a good choice. It works in conjunction with WooCommerce as well as the rest of your website to provide a general overview of any modifications that are being made.

Your log page in the Dashboard section, Simple History Your preferences page can be found in settings > simple History. The logs are stored for 60 days. You can look them up for specific terms.

The user interface is nice and sleek, so if the messiness that is often found in log plugins bothers you, you may enjoy Simple History.

How To Track WooCommerce Error Logging

The ability to log activity is available with a simple plugin, however, if you want to log errors then you'll likely have to do some extra setting.

Track WooCommerce Logging

These errors can be very simple to spot They are easily found in WooCommerce. Logs are available under WooCommerce's Status. After that, click on the logs tab on the right.

Use the dropdown menus to launch it. If your site's generated an error that is fatal there's a log waiting for you in this page. Click on it, then click View to see what happened.

You'll know when the error took place and also some aspects of the code that could have caused the error. If you're comfortable with PHP it can guide you to the correct direction on how to correct the problem.

If there aren't any warnings of errors here it means that your website runs without problems. Every once in a while to make sure everything is still running smoothly. If your business ever begins to show signs of trouble it should be the first place you look.

Checking logs in WordPress.
Checking logs in WordPress.

It is also possible to access the PHP error logs in general since they offer a bit more information that just the fatal error resulted to WooCommerce.

Log in to your website and find the error.log file, which may be found in a number of locations but is often in the root folder, public_html, or var/log directory.

Enable WooCommerce Debugging

If you're currently experiencing problems, you may be able to setting the debug option. It will start logging errors to a file you can find in your server.

Utilize an FTP program to access your server. You will need to locate wp-config.php in the root folder of your website. Include the below code (or modify the values , if it exists already):  define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );

Adding code to wp-config.php 
The code should be added into wp-config.php

In the meantime, you'll discover a new log file inside the wp-content folder: debug.log.

You can try triggering your issue once more, then examine the debug.log to see what's been being output. This can help lead you in the right direction towards solving your error.

Make sure you turn off debugging after you've finished, since it can present a security issue if left on for long periods of time.

Add Custom Log Entry

How do you go about getting the WooCommerce logger to track an individual function and show it in your dashboard just as errors that cause fatal damage? This is totally possible, however it is a bit of advanced understanding of PHP and comfort in adding codes to your site.

This option is ideal if you want to track certain activity on your store without using an activity log software, or to keep an eye on the errors WooCommerce typically doesn't report.

WooCommerce makes use of it's the WC_Logger function for handling logs. You can benefit from through the wc_get_logger. You can even write these logs directly to your admin section using the WC_Log_Handler_DB function.

After you've created your customized code, you'll need to insert it into functions.php using FTP or Theme File Editor You can also create an extension if you're using many complex codes.

If you'd like to experience it in action you can check out this demonstration of custom WooCommerce logs.


Summary

It's an excellent idea to establish an activity log and monitor error reports, especially when you're running something as sensitive like an online shop.

WooCommerce isn't able to support activity-logging by default, so you'll have to install a plugin. Error logging is built-in, but if the system does not suffice, you can always add your own logs by using a little code.

Reduce time, money and maximize site performance with:

  • 24/7 help and support from WordPress Hosting experts 24/7.
  • Cloudflare Enterprise integration.
  • The global reach of the audience is enhanced by 34 data centers worldwide.
  • Optimization through our integrated Application for Performance Monitoring.