Update Specific Key Value in Complex `wp_options` object


This should b really easy but I can’t find reference – easy points for someone!

I have an option in my wp_options table, and need to set it via update_option(). I just can’t find the correct syntax for doing something similar to the following where I update the key object_key in the option my_plugin_settings where this is an option in my wp_options table:

update_option('my_plugin_settings[object_key]','new value');

How is it done correctly?

, , , Brian 4 years 2020-05-27T03:12:11-05:00 0 Answers 79 views 0

Leave an answer