Opened 12 months ago
add_post_meta/update_post_meta and cache
|Reported by:||nofearinc||Owned by:|
I have a custom post type with 2 fields for price, second one has 5% discount and I want to populate it automatically by hooking to 'save_post'.
I have a working logic that calls update_post_meta() (or add_post_meta() ) for the second field but it doesn't get executed even with several post updates. However, if I end my function call with a var_dump that outputs the values from the function, everything goes smooth.
It looks like some caching issue to me that gets flushed per var_dump call, anyone able to reproduce?