Subscriptions Logs

The WooCommerce Subscriptions extension creates and adds to a number of WooCommerce logs to record errors and other events. Recording these events can be important, especially when an issue occurs and the cause must be investigated. These logs record histories of different events that can provide clues as to the cause and repercussions of an issue. Below is a list of the logs that Subscriptions creates and modifies.

Logs can be found on the dashboard of a site. To view the logs:

  1. Go to WooCommerce > Status
  2. Click on the Logs tab
  3. Choose a log from the drop-down

Log names will begin with the given labels, but will sometimes then have a date and a string of letters and numbers, called a hash, added to them. This is to ensure that each log has a unique name and is not overwritten.

WooCommerce Logs Tab

Error Logs

Failed Status Change Logs

This log is labeled wcs-update-status-failures. This log records when there has been an error when updating the status of a subscription.

Example log entry:


Failed Status Change Log Example

Failed Scheduled Action Logs

This log is labeled failed-scheduled-actions. This log records when a scheduled action has failed. It will contain information such as the scheduled action’s name and ID, how long it was attempted, and the arguments.

Example log entry:


Failed Scheduled Action Log Example

Failed PayPal IPN Logs

This log is labeled wcs-ipn-failures. This log records fatal errors that occur while a PayPal IPN is being processed. These error messages will contain info such as a stack trace for where the error occurred.

Example log entry:


Failed PayPal IPN Log Example

PayPal Logs

This log is labeled paypal. Subscriptions does not generate this log, but adds to it. This log records PayPal IPNs, the actions taken with them, and errors.

Example log entry:


PayPal Log Example

Caching Event Logs

This log is labeled wcs-cache. This log records events related to caching, such as clearing the cache of a particular subscription. WCS_DEBUG must be on for this log to populate. The methods that use this cache were deprecated in Subscriptions version 2.3.

Example log entry:


Caching Event Log Example

Upgrade Logs

When WooCommerce Subscriptions is upgraded to a new version, for example, from version 2.4.7 to 2.5.0, it records some information about the upgrade process in a variety of logs.

General Upgrade Notes Logs

This log records during upgrades and contains:

  • Timestamp of when the upgrade occurred
  • Version of Subscriptions being updated to
  • Old version of Subscriptions updated from
  • WooCommerce version during this upgrade
  • WooCommerce database version
  • Environment info, which includes WordPress version
  • Info about active plugins, such as name, author, and version

The information in this log is automatically deleted after eight weeks. This log is labeled wcs-upgrade.

Example log entry:


Upgrade Log Example

Update Post Author Column Logs

This log is labeled wcs-upgrade-subscription-post-author. WooCommerce 3.5 began storing the customer ID associated with an order in the post_author field of the wp_posts table. Previously, this information was stored in post meta as _customer_user, and will continue to be stored there as well for backwards compatibility. This change should result in performance improvements when filtering by customer ID. Subscriptions 2.4 includes an upgrade to follow this change and store the customer ID associated with a subscription in the post_author field as well, but only for stores running WooCommerce 3.5 or greater. This log records the subscriptions that had the customer ID added to the post_author column or errors that occur in that process.

Example log entry:


Update Post Author Column Log Example

Migrate Payment Retries to Custom Tables Logs

This log is labeled wcs-retry-migrator. Subscriptions 2.4 migrates payment retry data to custom tables. This allows potential performance improvements for sites with payment retry data. This log records the payment retry id, the table it was migrated to, and its new id.

Example log entry:


Payment Retry Migration Log Example

Add Start Date Meta Data Logs

This log is labeled wcs-add-start-date-metadata. In Subscriptions 2.4, a metadata change was made to have separate entries for a subscription’s created date and start date. This is not a visible change at the moment, but the data on existing subscription will be updated. In the upgrade process for Subscriptions 2.4, a script will run that will add the start date meta data. This log records the subscriptions that have meta data added or errors that occur in that process.

Example log entry:


Add Start Date Meta Data Log Example

Add Subscription Address Index Logs

This log is labeled wcs-add-subscription-address-indexes. In the upgrade process for Subscriptions 2.3, a repair script will run to add address indexes for subscriptions created before WooCommerce 3.0 was in use, which is when address indexes were added. This log records the subscriptions whose addresses are updated or errors that occur during that process.

Example log entry:


Add Subscription Address Index Log Example

Repair PayPal Suspended Subscriptions Logs

This log is labeled wcs-upgrade-subscriptions-paypal-suspended. In the Subscriptions 2.3 upgrade, a repair script aligns subscriptions that were suspended in PayPal but not in WooCommerce. Due to a bug that was present from Subscriptions version 2.1.4 to 2.2.8, there were rare circumstances in which subscriptions in WooCommerce became out of sync with PayPal. This log records the subscriptions that were repaired or errors that occurred during that process.

Repair Contains Synced Variation Subscriptions Logs

This log is labeled wcs-upgrade-subscriptions-containing-synced-variations. In Subscriptions 2.2.0, there was a bug that meta data _contains_synced_subscription was not set in the case that a subscription containing a synced product variation was purchased when running WooCommerce version 3.0 or greater. This bug was fixed in Subscriptions 2.2.8. The upgrade to Subscriptions 2.2.9 contains a script that repairs the existing subscriptions that were created between versions 2.2.0 and 2.2.8 by adding that meta data. This log records the subscriptions that were repaired, those that needed no repair, and errors that occurred during that process.

Example log entry:


Repair Contains Synced Variation Subscriptions Log Example

Repair End of Pre-Paid Term Subscriptions Logs

This log is labeled wcs-upgrade-end-of-prepaid-term-repair. In Subscriptions 2.2.0, there was a condition which caused cancelled subscriptions to not schedule the action that would transition these subscriptions to cancelled status. The upgrade to Subscriptions 2.2.7 contains a script that repairs this and schedules the end of prepaid term actions. This log records the subscriptions that were repaired by immediate cancellation or adding an end of prepaid term action, those that needed no repair, and errors that occurred during that process.

Example log entry:


Repair End of Pre-Paid Term Subscriptions Log Example
Was this article helpful?
Dislike 0
Views: 5

Cart

Log in

Create an Account
Back to Top