Fires after the value of a specific option has been successfully updated.
Description
The dynamic portion of the hook name, $option
, refers to the option name.
Parameters
$old_value
mixed- The old option value.
$value
mixed- The new option value.
$option
string- Option name.
Source
do_action( "update_option_{$option}", $old_value, $value, $option );
It’s worth mentioning that this hook won’t fire if the old option value is exactly the same as the new one, meaning it won’t change anything in DB.
If you want to fire some additional code on update option event, I suggest using
"pre_update_option_{$option}"
hook instead.