Hi @onlycj
i need to update only not null values
You would need to write some custom code and use our API to do this. You’ll find information on our “pmxi_acf_custom_field” hook and an example snippet that you can adjust as per your needs here: https://github.com/soflyy/wp-all-import-action-reference/blob/master/all-import/pmxi_acf_custom_field.php.
Hi @wpallimport !
I tried to use this approach, but it looks like a post is modified before this hook.
When I execute $existing = get_post_meta( $pid, $name, true ); in wp_all_import_pmxi_acf_custom_field, it always gives me empty values, and in my opinion it happens because of wrong order of execution the hook and changing a post.
PS If I try to get meta from another post in the same hook, it works fine, so no debt about get_post_meta.
1
2
3
-
This reply was modified 8 years ago by
subbotaanton. Reason: added screenshots
PPS Fixed: “When I execute $existing = get_post_meta( $pid, $name, true ); in pmxi_acf_custom_field hook”