Unable to save EM_TAXONOMY_TAG when creating an event
-
I have added a hidden input field to Events Manager Event Form.
I have added the add_filter to call em-event.php ’em_event_save’.
Debugger shows data being posted:
Http Request body sending:…form-data; name=”event_area” NT-DarwinIn an mu-plugin file I have the following code …
(other functions in the file are working fine)/*=========Events Manager - Save Area Tag ======================*/ function my_em_tag_event_save($result, $EM_Event){ if( $EM_Event->event_id && !empty($_POST['event_area']) ){ /* set tags for post (delete existing) */ wp_set_post_terms( $EM_Event->post_id, $tags = $_POST['event_area'], $taxonomy = EM_TAXONOMY_TAG ); } return $result; } add_filter('em_event_save','my_em_tag_event_save',1,2);
The tag (NT-Darwin) does not get saved – all else is working.
Hope someone can help!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Unable to save EM_TAXONOMY_TAG when creating an event’ is closed to new replies.