Posted: May 21, 2020 at 10:07 pm
Hey there! I’m trying to duplicate an event with ACF fields.
And generated this code:
But it doesn’t seem to work. Can you help me figure out what I’m missing please?
The forums are not ideal for posting blocks of code, small snippets of a few lines are ok, but the above has multiple formated
Other than the formatted quotes, the above code looks fine.
However, something to note is our models have a wrapper for get/update/add_post_meta which saves you haveing to pass the ID around makes it a little easier to follow.
Can be swapped out for:
The relevant ID’s are passed internally.
Have you tried adding something like:
To the beginning of that callback to confirm you have both objects when duplicating?