Closed macbookandrew closed 2 years ago
@macbookandrew Looks good, thanks for the fix and contribution!
@macbookandrew Your fix was just released with v5.2.2, thanks again!
If you've got time, would you mind reviewing the plugin: https://wordpress.org/plugins/zero-spam/, I'd really appreciate it. The more that use this, the stronger it becomes to protect sites.
On a multisite installation, the plugin currently uses
get_site_option()
to read the current version butupdate_option()
to set it after the DB update.In my instance, I had the plugin network-activated, and every pageload resulted in 20s of latency while it ran the DB updates.
Once the DB updates were complete, it would write a site option, but on the next pageload, it would read from the (unset) network option, and run the DB updates again.
This PR resolves the issue by using
update_site_option()
instead, which falls back toupdate_option()
when not in multisite.