Save values from a pre_post_update
The second attempt is closer to the result, as it is filer, not action, and you can return proper data. But code has several mistakes, I have fixed them. The proper number of parameters for the filter is 3. The first parameter is $data which should be modified and returned. It is the standard behaviour … Read more