You should report it to the support channel for that plugin, wp-mail-smtp . (N.B. WordPress doesn’t officially support PHP 8.1 yet, but plugin authors may still be grateful for information helping them to be ready).
David
Joe
(@joewa1980)
To fix this error before a new release addresses the issue in wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/functions.php
change null
to ''
in line 310 as below. Removing the function entirely will cause a fatal error, so keep the function.
Original line 310:
function as_get_datetime_object( $date_string = null, $timezone = 'UTC' ) {
New line 310:
function as_get_datetime_object( $date_string = '', $timezone = 'UTC' ) {
A deprecation notice is not an error; deprecation is advance notice of something that will change in a future release of PHP, telling a programmer that he’ll need to make a change in order to be compatible with that future release. So the only thing you need to do is inform the programmer of that plugin and then you can forget about it. New PHP releases happen at the end of the year, and some deprecated items aren’t removed until new major versions (i.e. 9.0) which may be years away.
Joe
(@joewa1980)
Yes indeed, a depreciation notice but if the user wishes to not have it trigger the notice in their error log they can fix it as above until a new release is presented, as mentioned. Hope it helps!
Joe
(@joewa1980)
PS: I should add that this code change was given to the developer of the plugin prior to posting in this thread. Just hoping to help out @sajtfokus.