Error updating programmatically a plugin's setting
I made a simple mistake by defining the array with the setting value.
I wrote array('currentInvoiceNumber', $newInvoiceNumber) instead of array('currentInvoiceNumber' =&gt; $newInvoiceNumber).