WPML

Overview of the Issue

When using the Make Column Clickable Elementor plugin to open an Elementor Popup, the Popup IDs are not translated on secondary language pages. As a result, visitors see the popup in the original language instead of the translated one.

Workaround

Please make a full backup of your site before you start.

Add this code to your theme’s functions.php file. It covers columns, sections and containers:

// WPML workaround for wpmlpb-660: translate the popup in Make Column Clickable Elementor links
// (columns, sections and containers).
add_filter( 'wpml_pb_elementor_widget_dynamic_id_converters', function( $converters ) {
	$hasClickableLink = function( $element ) {
		return isset( $element['elType'] ) && in_array( $element['elType'], [ 'column', 'section', 'container' ], true );
	};

	$clickableLinkLens = \WPML\FP\compose(
		\WPML\FP\Obj::lensProp( 'settings' ),
		\WPML\FP\Obj::lensPath( [ '__dynamic__', 'column_link' ] )
	);

	return array_merge( $converters, [ [ $hasClickableLink, $clickableLinkLens, 'popup', 'popup' ] ] );
} );

Need Help with This Issue?

Ask a support question and we’ll look into it with you.

Ask a support question

All known issues