How can I view debug logs recorded ?

If you have WP_DEBUG defined as true in your wp-config.php file then you should be able to view all the logs recorded by CoCart under WooCommerce -> System Status -> Logs in your WordPress dashboard.

URL Example: https://example.com/wp-admin/admin.php?page=wc-status&tab=logs

In order for CoCart to record logs, you first need to have the logging enabled.

<?php
add_filter( 'cocart_logging', function() { return true; });

If you are debugging CoCart during your development, we personally like to change the WooCommerce log handler to be stored via the database.

This will require being defined in your wp-config.php file.

<?php
define( 'WC_LOG_HANDLER', 'WC_Log_Handler_DB' );

Was this helpful to you?