Deprecated: Return type of GeoIp2\Model\AbstractModel::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/u126274411/domains/rmweblab.com/public_html/wp-content/plugins/iq-block-country/vendor/geoip2/geoip2/src/Model/AbstractModel.php on line 63

Deprecated: Return type of GeoIp2\Record\AbstractRecord::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/u126274411/domains/rmweblab.com/public_html/wp-content/plugins/iq-block-country/vendor/geoip2/geoip2/src/Record/AbstractRecord.php on line 57
WordPress settings_errors() display update message twice | RM Web Lab

WordPress settings_errors() display update message twice

In wordpress plugin or theme settings API, when we add settings error, I face problem with display update message twice. and this is happen only when first times settings save.

After a day long troubleshooting, I got this is because when update_option, it call add_option function first time. and that is the main reason to display update message duplicate in first time save.

To resolve this issues, I added default options value by update_option when plugin is active and error gone!!!

Hope this help others.

Thanks

https://github.com/wearerequired/WP-Widget-Disable/issues/11


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *