Home › Forums › Pre-purchase Questions › How to replace existing plugin fields with ACF fields? › Reply To: How to replace existing plugin fields with ACF fields?
I did manage to accomplish this with a native wordpress function.
add_action( 'save_post', 'change_meta_on_update', 100, 3 );
function change_meta_on_update( $post_id, $post, $update ) {
$new = get_post_meta( $post_id, 'titel', true );
update_post_meta( $post_id, 'profile_subtitle', $new );
}
Simply this fires after the post update (prio 100). Takes the value I wanted from ACF (“title”) and then updates the other value (“profile_subtitle”).
🙂
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.