save() function doesn't save field with updated value
-
Pods version 2.5.1.1
Following the instructions on the pods documentation, this is my code:
$invoice = pods( 'invoice', $post_id ); $invoice->save( 'invoice_sent_date', '2015-11-05' );The problem is that the updated value isn’t saved.
For context, here is what I’m doing: I created a Custom Post Type called Invoice using the Pods admin interface. When I Publish a new Invoice, I’m using WordPress’s action hooks to call a custom function which contains the above code. The function will send an email then automatically update the field named invoice_sent_date with the current date (I’m using a value of 2015-11-05 for testing purposes)
As mentioned, the save() function doesn’t seem to be working. Really stumped on this one.
The topic ‘save() function doesn't save field with updated value’ is closed to new replies.