Is Dokan compatible with WPML

This topic contains 3 reply and 4 voices, and was last updated by Federica Canton 9 years, 4 months ago
Viewing 3 Posts - 1 through 3 (of 3 total)
Author Posts
December 9, 2014 at 12:23 pm 32023
Federica Canton Hi, I am wondering if Dokan is compatible with WPML. I have purchased and downloaded Dokan but we were hoping to have multiple languages for our store. If so I am wondering since WPML has a duplicate custom post type which is similar to duplicating product can we on insert: add_action('wp_insert_post', 'duplicate_master_post', 10, 3); create a function to use the following code?
function duplicate_master_post($post_id, $post, $update){
    global $sitepress, $iclTranslationManagement;
     
     
    $only_cpt   = array();
    $only_cpt[] = 'products';
     
    if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
        return;
    }
    // don't save for revisions
    if ( isset( $post->post_type ) && $post->post_type == 'revision' ) {
        return;
    }
    // only duplicate when publishing
    if ($post->post_status != 'publish') {
        return;
    }
    // avoid recursion
    remove_action('wp_insert_post', 'duplicate_master_post', 10);
 
    if ( !isset( $iclTranslationManagement ) ) {
        $iclTranslationManagement = new TranslationManagement;
    }
        
    $post_type = get_post_type( $post_id );
    if ( $sitepress->is_translated_post_type( $post_type ) && in_array( $post_type, $only_cpt ) ) {
        $iclTranslationManagement->make_duplicates_all( $post_id );
    }
}
add_action('wp_insert_post', 'duplicate_master_post', 10, 3);
So the product will be duplicated on multiple languages?
December 13, 2014 at 1:01 pm 32238
Sekander Badsha Sekander Badsha

Hello Timothy,

Dokan is not WPML compatible. And I am not that good with codes :p
So I am forwarding your topic to the developer team and check if they can help you with it

Thank you for having patience 🙂

December 20, 2014 at 4:11 pm 32673
Tor B Tor B

+1 on WPML compatibility; it would be a very, very good thing to have, as WooCommerce is WPML compatible. What is missing?

December 23, 2014 at 4:30 pm 32876
Federica Canton Federica Canton

Hello, there are ant news? I’m interesting to use WPML with Dokan. Thanks

Viewing 3 Posts - 1 through 3 (of 3 total)