If you’re seeing a warning like:
Deprecated: Creation of dynamic property...
orWarning: Creation of dynamic property ClassName::$property is deprecated in...
You’re not alone as this is a common notice on sites running PHP 8.2 or newer.
Why You’re Seeing This Warning:
Starting in PHP 8.2, dynamic property creation is deprecated. This means that if a plugin or theme tries to create a new property on an object that hasn’t been explicitly declared, PHP will display a warning.
While it may seem like this is coming from MailPoet, we’ve reviewed our code and can confirm that MailPoet itself no longer uses any deprecated dynamic property creation.
What You Can Do:
1. Make Sure Everything Is Updated:
- Update MailPoet to the latest version.
- Update other plugins or themes that might be extending MailPoet’s functionality.
2. Check Which Plugin Is Causing It:
Use the error message stack trace (or temporarily enable WP_DEBUG) to check which plugin file the notice is coming from. If it’s not mailpoet/, it’s likely another plugin that integrates with MailPoet.
3. Switch to PHP 8.1 (Temporarily)
Until all plugins you use are fully PHP 8.2 compatible, switching back to PHP 8.1 might be a safe workaround.
Still Need Help?
If you’re unsure which plugin is triggering the warning, or you’d like us to double-check from our side, reach out to our support team and we’ll be happy to assist.