Open Priya-Goenka opened 1 year ago
@krinaydhanani @Priya-Goenka I am not getting the issue so please explain in brief.
@krinaydhanani I could not find the settings Go to WPML > Settings > Custom Field Translation > Show system fields and make sure to configure field accordingly in WPML. Below is the screenshot.
I could not get the settings field as per the description in WPML > Settings > Custom Field Translation > Show system fields Events ‹ Event Organizer — WordPress.webm
WPML addons activation is expired Need to activate it again.
Issue #2 Reported in this ticket: https://wpml.org/forums/topic/wp-event-manager-plugin-event-organizer-not-translatable
Steps to reproduce
Workaround / Fix
On wp-content\plugins\wp-event-manager\wp-event-manager-template.php, inside get_organizer_name() replace the following line (around 1229 ): foreach ($post->_event_organizer_ids as $key => $organizer_id) { With: foreach ($post->_event_organizer_ids as $key => $organizer_id) {
// WPML Workaround for compsupp-6662 if (class_exists('SitePress')) { $organizer_id = apply_filters( 'wpml_object_id', $organizer_id, 'event_organizer', TRUE ); }
On wp-content\plugins\wp-event-manager\wp-event-manager-functions.php, replace get_event_organizer_ids() (around line 1903): function get_event_organizer_ids( $post = null ) { $post = get_post( $post );
if ( $post->post_type !== 'event_listing' ) return;
return !empty($post->_event_organizer_ids) ? $post->_event_organizer_ids : ''; } With function get_event_organizer_ids( $post = null ) { $post = get_post( $post );
if ( $post->post_type !== 'event_listing' ) { return; }
// WPML Workaround for compsupp-6662 if ( class_exists('SitePress') && !empty($post->_event_organizer_ids) ) { foreach ($post->_event_organizer_ids as $key => $organizer_id ) { $result = $post->_event_organizer_ids; $result[$key] = apply_filters( 'wpml_object_id', $organizer_id, 'event_organizer', TRUE ); }
}
return !empty($post->_event_organizer_ids) ? $post->_event_organizer_ids : ''; }
Then around line 1985, replace get_event_venue_ids: function get_event_venue_ids( $post = null ) { $post = get_post( $post );
if ( $post->post_type !== 'event_listing' ) return;
return !empty($post->_event_venue_ids) ? $post->_event_venue_ids : ''; } With: function get_event_venue_ids( $post = null ) { $post = get_post( $post );
if ( $post->post_type !== 'event_listing' ) return;
// WPML Workaround for compsupp-6662 if ( class_exists('SitePress') && !empty($post->_event_venue_ids) ) { $result = apply_filters( 'wpml_object_id', $post->_event_venue_ids , 'event_listing', TRUE ); return $result; }
return !empty($post->_event_venue_ids) ? $post->_event_venue_ids : ''; }