Skip to content

Deprecated function notice: wc_get_log_file_path #43

Description

@garrettm30

The old WooCommerce function wc_get_log_file_path(), used in seven locations in this 2Checkout plugin, is now deprecated, and it is throwing deprecation notices that fill up the error logs in the development environment.

[10-Jul-2024 20:34:55 UTC] PHP Deprecated: Function wc_get_log_file_path is deprecated since version 8.6.0 with no alternative available. in /Users/USERNAME/Sites/site.test/wp-includes/functions.php on line 6078
[10-Jul-2024 20:34:57 UTC] The wc_get_log_file_path function is deprecated since version 8.6.0.

In fact, it does not look like the function is actually being put to use, as they are passed as values in sprintf calls with strings that have no variables (unless they are added in translation?): For example:

sprintf(__('Log 2Checkout events', 'woocommerce'), wc_get_log_file_path('twocheckout'))

So to keep my error log clean on my end, I just removed the sprintf calls with the deprecated function and kept the translatable string part.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions