Support » Plugin: Polylang » Polylang compatibility with WP All Import

  • Resolved Cloe Legoube

    (@cloe-legoube)


    Hello Chouby !
    I am looking for how to import products with differents langages with WP all import plugin with CSV file.
    I saw this plugin works with WPML but I am not sure it is working with Polylang.

    When I export my sample products, I see a custom taxonomies hidden called “post_translations”, ex : pll_565c49faa2f5c
    Each product has a different post_translation taxonomy but same for each language.

    I think I have to create an add-on to import this taxonomie but the problem is how to create this taxonomie because it is created automatically by your plugin ?

    Example (the difficulty for me is inside the function ‘bali_premium_posttranslation’,I have to add the imported field in the database) :

    include "rapid-addon.php";
    $bali_premium_calendars = new RapidAddon('Bali-Premium Calendars', 'bali_premium_calendars');
    $bali_premium_calendars->add_field('post_translations', 'Post Translations', 'text');
    $bali_premium_calendars->set_import_function('bali_premium_posttranslation');
    $bali_premium_calendars->admin_notice();
    $bali_premium_calendars->run(); 
    
    function bali_premium_posttranslation($post_id, $data, $import_options) {
    	global $bali_premium_calendars;
    	if ($bali_premium_calendars->can_update_meta('post_translations', $import_options)) {
    		update_post_meta($post_id, 'post_translations', $data['post_translations']);
    	}
    }

    Do you have any idea ? Maybe I can import french products first and then english products but matched with french … I don’t know)

    Is there a compatibility with Polylang ?
    Thank you so much (I have 450 products to import, so it will be very useful!)

    Cloé

    https://wordpress.org/plugins/polylang/

Viewing 5 replies - 16 through 20 (of 20 total)
Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Polylang compatibility with WP All Import’ is closed to new replies.