- Status
- Aberto
- Plugin/tema relacionado
- The Events Calendar
- Tags de tópico
- Compatibility
Visão geral do problema
Em sites que usam o plugin The Events Calendar (TEC) com o WPML configurado para domínios diferentes por idioma, os links de eventos podem exibir URLs incorretas ao alternar idiomas.
Solução alternativa
Por favor, certifique-se de fazer um backup completo do seu site antes de prosseguir.
- Abra o arquivo …/wp-content/plugins/events-calendar-pro/src/Events_Pro/Custom_Tables/V1/Integrations/WPML/WPML_Integration.php.
- Procure a linha 78.
- Altere:
// Remove the home URL from permalink. $post_link = str_replace( array( home_url( '/' ), site_url( '/' ) ), '', $post_link );
- Para:
// Remove the home URL from permalink. $post_link = str_replace( array( home_url( '/' ), site_url( '/' ), get_option( 'home' ) ), '', $post_link );