Support » Plugin: WP ULike - Most Advanced WordPress Marketing Toolkit » Show likes on blog posts in all languages

  • Resolved avolchanska

    (@avolchanska)


    Hello, I use WPML plugin for duplicating blog post so I have blog post in 2 language versions. The problem is amount of likes different on this posts. For comments I use plugin https://wordpress.org/plugins/multilingual-comments/ so now I have same comments on two versions of posts.
    I wanted to ask if you plugin has functionality for likes synchronization?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Alimir

    (@alimir)

    Hey @avolchanska

    Currently we don’t have an active WPML license, however we made a solution to fix this. Can you please try to do following step?

    Go to wp-content/plugins/wp-ulike/includes/functions/content-types.php and then inside the “wp_ulike” function try to replace:

    if( empty( $post_ID ) ){
    //global variables
    global $post;
    $post_ID = isset( $post->ID ) ? $post->ID : NULL;
    }

    with this line:

    if( empty( $post_ID ) ){
    //global variables
    global $post;
    $post_ID = isset( $post->ID ) ? $post->ID : NULL;
    
    // wpml synchronization
    if ( defined( 'ICL_SITEPRESS_VERSION' ) ) {
    global $sitepress;
    
    if( $sitepress->get_setting( 'setup_complete' ) ){
    $post_ID = apply_filters('wpml_object_id', $post_ID, 'post', true);
    }
    }
    }

    If it worked fine for you, we will add it for our next update. 🙂

    Plugin Author Alimir

    (@alimir)

    hey @avolchanska

    the “Enable WPML Synchronization” option has been added on the new update. (V4.6.4)

    https://docs.wpulike.com/article/14-content-types-settings

    • This reply was modified 1 month, 3 weeks ago by Alimir.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.