Open
Reported for: CMS multilingue de WPML 4.6.13
Overview of the issue
When using Elementor popups with WPML, containers with links set to open a popup will always display it on the default language, even if you have a translated version of it.
Workaround
Please, make sure of having a full site backup of your site before proceeding.
- Open your theme’s functions.php file.
- Add the following snippet:
/** * Convert the popup link in an container * compsupp-7641 workaround */ add_filter( 'wpml_pb_elementor_widget_dynamic_id_converters', function( $converters ) { $isContainer = WPMLFPRelation::propEq( 'elType', 'container' ); $containerLinksLens = WPMLFPcompose( WPMLFPObj::lensProp( 'settings' ), WPMLFPObj::lensPath( [ '__dynamic__', 'link' ] ) ); return array_merge( $converters, [ [ $isContainer, $containerLinksLens, 'popup', 'popup' ], ] ); } );