Apologies for the delay over the weekend.
You can still disable logging for EUM using these two hooks/filters:
pre_update_site_option_MPSUM
pre_update_option_MPSUM
You will need to create a mu-plugin. To do this use a text editor and add copy and paste the following;
<?php
function eum_disable_logs($value) {
if (!is_array($value)) $value = array();
if (empty($value['core']) || !is_array($value['core'])) $value['core'] = array();
$value['core']['logs'] = 'off';
return $value;
}
add_filter('pre_update_site_option_MPSUM', 'eum_disable_logs', 10);
add_filter('pre_update_option_MPSUM', 'eum_disable_logs', 10);
Then, save it with a .php file extension. Upload it to the wp-content/mu-plugins directory of your site (you may need to create the mu-plugins file)
In the EUM plugin, click any setting in the Updates settings section. After clicking, the Update Logs should be disabled.
Thread Starter
alexDx
(@alexdx)
Hi, I have followed these steps, but I’m still seeing the logs being written to.
Example site: https://adamstonvet.com/
I cleared out the wp_eum_logs table
I’ve created a new mu-plugin with the following code:
<?php
function eum_disable_logs($value) {
if (!is_array($value)) $value = array();
if (empty($value['core']) || !is_array($value['core'])) $value['core'] = array();
$value['core']['logs'] = 'off';
return $value;
}
add_filter('pre_update_site_option_MPSUM', 'eum_disable_logs', 10);
add_filter('pre_update_option_MPSUM', 'eum_disable_logs', 10);
I’ve uploaded this as eum_disable_logs.php to /wp-content/mu-plugins directory on 7/2/2024.
Cleared server cache, then clicked on a setting in the Updates settings section.
Still seeing plugin updates logged to the table ….
Thread Starter
alexDx
(@alexdx)
Instead of adding this code to the mu-plugins folder, should I try adding it to my theme’s functions.php instead?
Hi,
Apologies, this was marked as resolved but I am not sure if this was a mistake so I have re-opened it.
Do you still need assistance with this?
Thread Starter
alexDx
(@alexdx)
yes I mentioned it was not working above. …
Can you take a screenshot of the table for me?
Thread Starter
alexDx
(@alexdx)
Hi,
Apologies, I have not forgotten you and I am still trying to find a solution for you.
Hi,
Apologies, could you please replace the line in the mu-plugin file
$value['core']['logs'] = 'off';
with
$value['core']['logs'] = 'unset';
You might also want to click any setting on the General tab to apply the changes
Thanks
Anthon