skip to Main Content

WordPress – When using a hook, records are duplicated

I use a hook edit_post_(post_type). After updating a record, I get two new records at once when I only need one. What am I doing wrong? add_action('edit_post_applications', 'add_new_university'); function add_new_university($id) { $post_field = get_fields($id); return wp_insert_post(array( 'post_type' => 'institution', 'post_title'…

VIEW QUESTION
Back To Top
Search