I know that when delete_option() or update_option() fail to perform their respective database interactions, they return false. Does anyone know why they wouldn’t be able to perform these actions?

It’s only for specific options. Most options will work, however, a few options just seem to “die”. They’ll work fine for a while, then just stop working. Any ideas?

2 Answers
2

The delete_option() function will return false if the option does not exist.

The update_option() function will return false if the option already has the same value as what you’re trying to update it to.

Both will also return false if the SQL query itself fails for whatever reason.

Leave a Reply

Your email address will not be published. Required fields are marked *