WPML

Overview of the Issue

In Happy Elementor Addons, some widget texts are not sent for translation, so translated pages show them in the default language: the repeater texts of the Image Stack Group, Photo Stack and Post Info widgets, the Team Member button text and link, and the Image Hover Effect description.

Workaround

Until the HappyAddons team fixes it:

  1. Make a full site backup of your site before proceeding.
  2. Add this code to your theme’s functions.php file:
    add_filter( 'wpml_elementor_widgets_to_translate', function ( $widgets ) {
        if ( defined( 'HAPPY_ADDONS_DIR_PATH' ) ) {
            foreach ( array( 'image-stack-group', 'photo-stack', 'post-info' ) as $file ) {
                include_once HAPPY_ADDONS_DIR_PATH . 'wpml/' . $file . '.php';
            }
        }
        if ( isset( $widgets['ha-member']['fields'] ) ) {
            $widgets['ha-member']['fields'][] = array( 'field' => 'button_text', 'type' => 'Team Member: Button Text', 'editor_type' => 'LINE' );
            $widgets['ha-member']['fields']['button_link'] = array( 'field' => 'url', 'type' => 'Team Member: Button Link', 'editor_type' => 'LINK' );
        }
        if ( isset( $widgets['ha-image-hover-effect']['fields'] ) ) {
            $widgets['ha-image-hover-effect']['fields'][] = array( 'field' => 'hover_description', 'type' => 'Image Hover Effect: Description', 'editor_type' => 'AREA' );
        }
        return $widgets;
    }, 11 );
  3. Update the translations of your pages: the texts now appear in the translation editor.

All known issues

Need Help with This Issue?

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