Use Ajax to get an Options Settings Value


In my plugin, a link on the screen will call a JS function. That function needs to retrieve and update a value in the options table. So the sequence is to:

  • user clicks the link

  • that calls the JS function, in which …

  • variables are set that are needed for the get – equivalent to get_option($option_name)

  • an AJAX GET will return current value of the $option_name

  • that returned value will be modified

  • and then stored into the options table via an AJAX POST – equivalent to


How would I create the AJAX equivalent of get_option and update_option – or is this even possible?

Rick Hellewell 2 months 2022-10-01T17:40:44-05:00 0 Answers 0 views 0

Leave an answer