• Resolved Mehraz Morshed

    (@mehrazmorshed)


    PHP Deprecated: Automattic\WooCommerce\Internal\Admin\Settings\Utils::truncate_with_words(): Implicitly marking parameter $append as nullable is deprecated, the explicit nullable type must be used instead in /Users/th22/pro/smart-brands-pro/wp-content/plugins/woocommerce/src/Internal/Admin/Settings/Utils.php on line 263

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Mehraz Morshed

    (@mehrazmorshed)

    WooCommerce v9.8.3
    WordPress v6.8.1
    PHP v8.4.4

    Jonayed (woo-hc)

    (@jonayedhosen)

    Hi @mehrazmorshed ,

    Thanks for reaching out—and I totally get how concerning it can be to see a deprecation warning pop up, especially when you’re trying to keep things running smoothly.

    The warning you’re seeing:

    PHP Deprecated: Automattic\WooCommerce\Internal\Admin\Settings\Utils::truncate_with_words(): Implicitly marking parameter $append as nullable is deprecated, the explicit nullable type must be used instead

    is related to upcoming changes in PHP 8.4. This version introduces a deprecation for implicitly nullable parameter declarations. You can read more about that here, if you’re curious.

    We’re already tracking this on our end, and you can follow the progress here: WooCommerce GitHub issue #57385. In the meantime, here are a couple of things you can do:

    • Temporary workaround: Downgrading your PHP version slightly to 8.3 should avoid the warning for now.
    • Optional tweak: If you’d prefer to keep PHP 8.4 and simply suppress the deprecation warnings, you can add the following line to your wp-config.php file:
    error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);

    This won’t fix the root cause, but it can help keep your logs clean while we work on a permanent solution.

    Thanks again for your patience!

    Plugin Support Kay U a11n

    (@kingsleyinfo)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved.

    If you have a few minutes, we’d love if you could leave us a review: https://ww.wp.xz.cn/support/plugin/woocommerce/reviews/

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Implicitly marking parameter $append as nullable is deprecated’ is closed to new replies.