Dieser Benutzer hat keine favorisierten Themen.
Favorisierte Forenthemen
Erstellte Forenthemen
Status |
Thema
|
Supporter | Stimmen | Beiträge | Aktualität |
---|---|---|---|---|---|
WPML + WP-Event Manager Registrations Plugin
Gestartet von: timoR-12
in: English Support
Problem: Solution: For the code replacements at lines 497 and 595, use the following custom functions: if ( ! function_exists( 'get_event_registration_count' ) ) {<br /> function get_event_registration_count( $event_id ) {<br /> $element_type = 'post_' . get_post_type( $event_id );<br /> $trid = apply_filters( 'wpml_element_trid', null, $event_id, $element_type );<br /> $translations = apply_filters( 'wpml_get_element_translations', null, $trid, $element_type );<br /> $event_ids = array_map( function ( $translation ) {<br /> return $translation->element_id;<br /> }, $translations );<br /> return sizeof( get_posts( array(<br /> 'post_type' => 'event_registration',<br /> 'post_status' => array_merge( array_keys( get_event_registration_statuses() ), array( 'publish' ) ),<br /> 'posts_per_page' => -1,<br /> 'fields' => 'ids',<br /> 'post_parent__in' => $event_ids,<br /> ) ) );<br /> }<br />}<br /> if ( ! function_exists( 'user_has_registered_for_event' ) ) {<br /> function user_has_registered_for_event( $user_id, $event_id ) {<br /> if ( ! $user_id ) {<br /> return false;<br /> }<br /> $element_type = 'post_' . get_post_type( $event_id );<br /> $trid = apply_filters( 'wpml_element_trid', null, $event_id, $element_type );<br /> $translations = apply_filters( 'wpml_get_element_translations', null, $trid, $element_type );<br /> $event_ids = array_map( function ( $translation ) {<br /> return $translation->element_id;<br /> }, $translations );<br /> return sizeof( get_posts( array(<br /> 'post_type' => 'event_registration',<br /> 'post_status' => array_merge( array_keys( get_event_registration_statuses() ), array( 'publish' ) ),<br /> 'posts_per_page' => 1,<br /> 'fields' => 'ids',<br /> 'post_parent__in' => $event_ids,<br /> 'meta_query' => array(<br /> array(<br /> 'key' => '_attendee_user_id',<br /> 'value' => absint( $user_id )<br /> )<br /> )<br /> ) ) ) > 0;<br /> }<br />}<br /> If this solution does not resolve your issue or seems outdated, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening a new support ticket for further assistance. |
|
0 | 11 | Vor 1 Woche, 3 Tage | |
Dates not Synchronized on Events (WP Event Manager)
Gestartet von: timoR-12 in: Chat Support |
|
0 | 2 | Vor 3 Wochen, 5 Tage |