- Status
- Aberto
- Plugin/tema relacionado
- RSVP Pro
- Tags de tópico
- Compatibility
Visão geral do problema
Se você estiver usando o plugin RSVP Pro, poderá encontrar problemas em que algumas strings não são exibidas como traduzidas no frontend ao usar o WPML. Esse problema geralmente ocorre porque a chave exclusiva da string excede o limite de caracteres definido pelo sistema, resultando em chaves incompatíveis e strings não traduzidas.
Solução alternativa
Por favor, certifique-se de ter um backup completo do seu site antes de prosseguir.
- Abra o arquivo app/public/wp-content/plugins/rsvp-pro-plugin/includes/rsvp-utils.inc.php
- Procure a linha 1069.
- Substitua:
function rsvp_pro_get_dynamic_translated_string( $key_name, $string, $event_id ) { $text = $string; if ( function_exists( 'pll__' ) ) { $text = pll__( $string ); } if ( has_filter( 'wpml_translate_string' ) ) { $event_name = rsvp_pro_get_event_name( $event_id ); $package = array( 'kind' => "RSVPPro - {$event_id}", 'name' => "rsvp-pro-plugin-{$event_id}", 'title' => "RSVP Pro Plugin - {$event_name}", ); $key_name = strtolower( $key_name ); $key_name = str_replace( ' ', '-', $key_name ); $text = apply_filters( 'wpml_translate_string', $string, $key_name, $package ); } return $text; } - Por:
function rsvp_pro_get_dynamic_translated_string( $key_name, $string, $event_id ) { $text = $string; if ( function_exists( 'pll__' ) ) { $text = pll__( $string ); } if ( has_filter( 'wpml_translate_string' ) ) { $event_name = rsvp_pro_get_event_name( $event_id ); $package = array( 'kind' => "RSVPPro - {$event_id}", 'name' => "rsvp-pro-plugin-{$event_id}", 'title' => "RSVP Pro Plugin - {$event_name}", ); $key_name = strtolower( $key_name ); $key_name = str_replace( ' ', '-', $key_name ); // WPML Workaround for compsupp-7503 $key_name = substr($key_name, 0, 160); $text = apply_filters( 'wpml_translate_string', $string, $key_name, $package ); } return $text; }