• Resolved tonygao

    (@tonygao)


    the error message in debug.log is as below:

    [09-Sep-2024 05:20:43 UTC] PHP Deprecated: Function is_staging_site is deprecated since version 3.3.0! Use in_safe_mode instead. in /home/public_html/wp-includes/functions.php on line 6085

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello tonygao,

    Thank you for contacting Woo support.

    The message you’re seeing indicates that your site is using deprecated code, specifically the is_staging_site function, which has been replaced by in_safe_mode.

    To troubleshoot this:
    Disable your active plugins one by one to identify which plugin is using the outdated code.
    You can also temporarily switch to the default Twenty Twenty-Four theme to check if the issue is related to your theme.

    Additionally, to prevent such messages from displaying, ensure that WP_DEBUG is set to false in your wp-config.php file.

    Let us know if you need further help!

    Best regards.

    Thread Starter tonygao

    (@tonygao)

    After a search, woocommer plugin(s) use s_staging_site. See below:

    /home/public_html/wp-content/plugins/woocommerce-payments/vendor/automattic/jetpack-status/src/class-status.php
    /home/public_html/wp-content/plugins/woocommerce-payments/vendor/automattic/jetpack-sync/src/class-actions.php
    /home/public_html/wp-content/plugins/woocommerce-payments/vendor/automattic/jetpack-connection/src/sso/class-sso.php
    /home/public_html/wp-content/plugins/woocommerce-payments/vendor/automattic/jetpack-connection/src/class-rest-connector.php
    /home/public_html/wp-content/plugins/woocommerce/vendor/automattic/jetpack-status/src/class-status.php
    /home/public_html/wp-content/plugins/woocommerce/vendor/automattic/jetpack-connection/src/class-rest-connector.php
    /home/public_html/wp-content/plugins/woocommerce/includes/class-wc-tracker.php
    /home/public_html/wp-content/plugins/woocommerce-services/vendor/automattic/jetpack-status/src/class-status.php
    /home/public_html/wp-content/plugins/woocommerce-services/vendor/automattic/jetpack-status/CHANGELOG.md
    /home/public_html/wp-content/plugins/woocommerce-services/classes/class-wc-connect-jetpack.php
    /home/public_html/wp-content/plugins/woocommerce-services/classes/class-wc-connect-help-view.php
    /home/public_html/wp-content/plugins/woocommerce-services/classes/class-wc-connect-api-client.php

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello tonygao,

    Thank you for your reply.

    I understand that the is_staging_site function is part of the WooCommerce.
    It is deprecated (not yet removed) to allow other plugins and theme authors to update their code.

    There is a plugin that is calling this deprecated function.
    To find out which plugin is using this function, disable your plugins one by one and check the error log. When the affected plugin is disabled the log entries will not be created.

    Let me know if you have any questions.

    Best regards.

    Thread Starter tonygao

    (@tonygao)

    The problem is caused by the “WooCommerce Shipping & Tax” plugin

    /home/public_html/wp-content/plugins/woocommerce-services/vendor/automattic/jetpack-status/src/class-status.php
    /home/public_html/wp-content/plugins/woocommerce-services/vendor/automattic/jetpack-status/CHANGELOG.md
    /home/public_html/wp-content/plugins/woocommerce-services/classes/class-wc-connect-jetpack.php
    /home/public_html/wp-content/plugins/woocommerce-services/classes/class-wc-connect-help-view.php
    /home/public_html/wp-content/plugins/woocommerce-services/classes/class-wc-connect-api-client.php

    After disable the plugin, no notice in debug.log. Please fix it!

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @tonygao,

    After disable the plugin, no notice in debug.log. Please fix it!

    First step, please make sure that your WooCommerce Shipping & Tax is up-to-date. Then you can try having only WooCommerce and the WooCommerce Shipping & Tax as the active plugins to see if the same issue persists.

    Thread Starter tonygao

    (@tonygao)

    The WooCommerce Shipping & Tax is the latest version. Will try to debug which plugin call it and caused the problem

    Plugin Support Rajesh K. (woo-hc)

    (@rajeshml)

    Hello @tonygao,

    Thanks for confirming this. Please let us know how this goes or if you have additional questions.

    Thanks!

    Thread Starter tonygao

    (@tonygao)

    Based on the following debug trace, it seems the problem is within the plugin, I already uninstalled jetpack but the plugin seems still trying to use it

    [11-Sep-2024 02:31:35 UTC] Array
    (
    [0] => Array
    (
    [file] => /home/public_html/wp-includes/functions.php
    [line] => 5554
    [function] => wp_trigger_error
    )

    [1] => Array
        (
            [file] => /home/public_html/wp-content/plugins/woocommerce-services/vendor/automattic/jetpack-status/src/class-status.php
            [line] => 179
            [function] => _deprecated_function
        )
    
    [2] => Array
        (
            [file] => /home/public_html/wp-content/plugins/woocommerce-payments/vendor/automattic/jetpack-sync/src/class-actions.php
            [line] => 307
            [function] => is_staging_site
            [class] => Automattic\Jetpack\Status
            [type] => ->
        )
    
    [3] => Array
        (
            [file] => /home/public_html/wp-content/plugins/woocommerce-payments/vendor/automattic/jetpack-sync/src/class-main.php
            [line] => 24
            [function] => sync_allowed
            [class] => Automattic\Jetpack\Sync\Actions
            [type] => ::
        )
    
    [4] => Array
        (
            [file] => /home/public_html/wp-content/plugins/woocommerce-services/vendor/automattic/jetpack-config/src/class-config.php
            [line] => 257
            [function] => configure
            [class] => Automattic\Jetpack\Sync\Main
            [type] => ::
        )
    
    [5] => Array
        (
            [file] => /home/public_html/wp-content/plugins/woocommerce-services/vendor/automattic/jetpack-config/src/class-config.php
            [line] => 217
            [function] => enable_sync
            [class] => Automattic\Jetpack\Config
            [type] => ->
        )
    
    [6] => Array
        (
            [file] => /home/public_html/wp-content/plugins/woocommerce-services/vendor/automattic/jetpack-config/src/class-config.php
            [line] => 112
            [function] => ensure_feature
            [class] => Automattic\Jetpack\Config
            [type] => ->
        )
    
    [7] => Array
        (
            [file] => /home/public_html/wp-includes/class-wp-hook.php
            [line] => 324
            [function] => on_plugins_loaded
            [class] => Automattic\Jetpack\Config
            [type] => ->
        )
    
    [8] => Array
        (
            [file] => /home/public_html/wp-includes/class-wp-hook.php
            [line] => 348
            [function] => apply_filters
            [class] => WP_Hook
            [type] => ->
        )
    
    [9] => Array
        (
            [file] => /home/public_html/wp-includes/plugin.php
            [line] => 517
            [function] => do_action
            [class] => WP_Hook
            [type] => ->
        )
    
    [10] => Array
        (
            [file] => /home/public_html/wp-settings.php
            [line] => 555
            [function] => do_action
        )
    
    [11] => Array
        (
            [file] => /home/public_html/wp-config.php
            [line] => 110
            [args] => Array
                (
                    [0] => /home/public_html/wp-settings.php
                )
    
            [function] => require_once
        )
    
    [12] => Array
        (
            [file] => /home/public_html/wp-load.php
            [line] => 50
            [args] => Array
                (
                    [0] => /home/public_html/wp-config.php
                )
    
            [function] => require_once
        )
    
    [13] => Array
        (
            [file] => /home/public_html/wp-admin/admin.php
            [line] => 34
            [args] => Array
                (
                    [0] => /home/public_html/wp-load.php
                )
    
            [function] => require_once
        )
    
    [14] => Array
        (
            [file] => /home/public_html/wp-admin/plugins.php
            [line] => 10
            [args] => Array
                (
                    [0] => /home/public_html/wp-admin/admin.php
                )
    
            [function] => require_once
        )

    )

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello tonygao,

    Thank you for your reply.

    To confirm, did you deactivate all the plugins except WooCommerce and WooCommerce Shipping & Tax?

    If not could you check again with WooCommerce and WooCommerce Shipping & Tax as active plugins?
    I am asking because the code line that is mentioned in the debug trace is catching the call to the deprecated function is_staging_site. This means another code is calling this function.

    Please conduct this test and let me know about your results.

    Looking forward to your response. ??

    Thread Starter tonygao

    (@tonygao)

    After further debug, it seems the problem caused by the plugin “woocommerce payments”

    In file: /home/public_html/wp-content/plugins/woocommerce-payments/woocommerce-payments.php

    There is code that initialize jetpack even when jetpack not installed

    Thread Starter tonygao

    (@tonygao)

    Just updated the WooCommerce Payments plugin to the latest version(8.2.1) and the problem solved.

    Plugin Support RK a11n

    (@riaanknoetze)

    Hey @tonygao

    That’s great to hear and thanks for updating the thread to let us know everything is working as expected again ??

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.