• Resolved Ben Andersen

    (@ben72)


    How can I disable the output of events like this in wp-content/debug.log?

    [26-Oct-2023 05:22:20 UTC] WC_Email_Customer_Processing_Order Object
    ...

    It has a really long output and it makes it hard to spot other potential issues in the log file.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @ben72 ??

    How can I disable the output of events like this in wp-content/debug.log?

    There is currently no default option in WooCommerce to disable certain events in the debug.log file., and customizing that would require a bit of additional coding. Custom coding goes beyond the scope of support we are able to provide in this forum.

    However, if you search for “How can I disable the output of the?WC_Email_Customer_Processing_Order Object?event in the wp-content/debug.log?” on Google or an AI engine you should obtain some helpful results.

    I’m going to leave it open for a bit, though, to see if anyone is able to chime in to help you out.

    If you require more help with the actual coding, we’d recommend hiring a developer or one of the customization experts listed at https://woo.com/customizations/.

    I hope this helps! If you have any further questions or concerns, please don’t hesitate to ask.

    Cheers.

    Thread Starter Ben Andersen

    (@ben72)

    @rainfallnixfig Thank you for your reply!

    I get the same output in the root of the site in error_log. It’s 2265 lines long. Here is the start of it:

    [02-Nov-2023 20:39:50 UTC] WC_Email_New_Order Object
    (
        [id] => new_order
        [title] => New order (to shop)
        [enabled] => yes
        [description] => E-postutskicket "New Order" skickas till valda mottagare n?r en ny best?llning skapas.
        [heading] => 
        [subject] => 
        [template_plain] => emails/plain/admin-new-order.php
        [template_html] => emails/admin-new-order.php
        [template_base] => /home/ekoinsik/public_html/mysite.se/wp-content/plugins/woocommerce/templates/
        [recipient] => [email protected]
        [object] => WC_Order Object
            (
                [status_transition:protected] => 
                [data:protected] => Array
                    (
                        [parent_id] => 0
                        [status] => processing
                        [currency] => SEK
                        [version] => 8.2.1
                        [prices_include_tax] => 1
                        [date_created] => WC_DateTime Object
                            (
                                [utc_offset:protected] => 0
                                [date] => 2023-11-02 21:38:33.000000
                                [timezone_type] => 3
                                [timezone] => Europe/Stockholm
                            )
    
                        [date_modified] => WC_DateTime Object
                            (
                                [utc_offset:protected] => 0
                                [date] => 2023-11-02 21:38:33.000000
                                [timezone_type] => 3
                                [timezone] => Europe/Stockholm
                            )
    

    Is this coming from Woo core or not?
    With all those chunks of info it’s much harder to spot actual issues that I want to see like:

    [02-Nov-2023 22:05:28 UTC] WordPress database error Commands out of sync; you can't run this command now for query SHOW FULL COLUMNS FROM c78imylio_options made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Blocks\Assets\Api->update_script_data_cache, set_transient, wp_cache_set, WP_Object_Cache->set, WP_Object_Cache->_transient_set, update_option

    I have turned off debug logging on the site.

    define( 'WP_DEBUG', false );
    define( 'WP_DEBUG_LOG', false );
    • This reply was modified 1 year ago by Ben Andersen. Reason: added info on debug logging
    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @ben72

    The Commands out of sync error you’re seeing is a database error, not a WooCommerce error. This error typically occurs when a previous query didn’t fully execute or clean up after itself. It might be worth investigating this further, as it could potentially cause issues on your site.

    If you need further assistance with this, I would recommend hiring a developer or contacting your hosting provider.

    I hope this provides some clarity. Please let us know if you have any other questions!

    Thread Starter Ben Andersen

    (@ben72)

    @shameemreza Thank you for your reply! But you didn’t answer my question. I asked: “Is this coming from Woo core or not?”.
    And by “this” I mean the really long WC_Email_New_Order debug info.
    I only included the database error as an example of what I easily miss with all that Woo debug info which is not an error and should not imho be output to /error_log and /wp-admin/error_log. Is that Woo core or something else doing that?

    anastas10s

    (@anastas10s)

    Hi there @ben72 ??

    “Is this coming from Woo core or not?”.
    And by “this” I mean the really long WC_Email_New_Order debug info.

    Just to clarify, while the WC_Email_New_Order class is part of WooCommerce core (details here), it has to do with the email sent to the admin when a new order is received/paid for.

    Therefore, I suspect the verbose debug info you are encountering have to do with either email issue(s), a plugin, or custom code in place.

    I trust that points you in the right direction, but if you have more questions, let us know.

    We’re happy to help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disable Woo debug logging’ is closed to new replies.