[resolved] Product_type external via WP All Import (13 posts)

  1. maarten1234
    Posted 3 years ago #

    I'm using the Woocommerce plugin in combination with the WP All Import plugin (www.wpallimport.com).
    I need my Product_type to be set as External automatically but I can't figure out how. Now I have to manually set it to External and update the post.

    I tried configuring it in PHP and in PHPMyAdmin directly but this couldn't solve my problem.

    I know it is possible, since Woo Commerce also offers their own importer:
    And I found this topic about the csv importer, but I need it for WP All Import.


  2. bheadrick
    Posted 3 years ago #

    So, you're importing products using a non wc importer, and you want to have it set the product type to external, correct?

    Personally, I use WP CSV Importer to import my products, and it suits my needs pretty well. I need to fork it and add support for featured image, but anyway...

    I'm assuming the plugin you're using gives you the ability to use custom taxonomies, yes? Simply use it to set the term for the "product_type" taxonomy to "variable"

  3. maarten1234
    Posted 3 years ago #

    That is correct.
    I've setup these custom fields:
    But my products keep getting uploaded as simple products instead on external.

  4. bheadrick
    Posted 3 years ago #

    custom fields (aka postmeta) are different from taxonomies. Product categories, product tags, and shipping classes are other examples of taxonomies - did the plugin auto-detect those, or did you have to add them manually?

    product_type is the same type of thing as product categories

    Here's where it's registered:
    register_taxonomy( 'product_type',
    'hierarchical' => false,
    'update_count_callback' => '_update_post_term_count',
    'show_ui' => false,
    'show_in_nav_menus' => false,
    'query_var' => $admin_only_query_var,
    'rewrite' => false

    I'm guessing one of these false's is why it's not showing up for you.
    Since the plugin you're working with is a paid plugin, you should be able to contact the developer to help you out with getting the plugin to work for this purpose

  5. maarten1234
    Posted 3 years ago #

    hi bheadrick,

    Thank you very much!
    I've changed everything to 'true' and now it's showing up in my admin area!

    In case someone needs the same, I've changed the files:
    - woocommerce.php
    - admin/woocommerce-admin-import.php

  6. bheadrick
    Posted 3 years ago #

    Sure, it works, but the next time a woocommerce update comes out, you'll have to go hack up those files again - I guess it's not such a big deal since we're talking about importing and not something the site depends on constantly.

    I don't believe wordpress actually has methods available to override taxonomyies, though. I think you'd have to unregister it and reregister it if you wanted to avoid hacking the woocommerce plugin.

    Here's how you would unregister the taxonomy:

    add_action( 'init', 'unregister_taxonomy');
    function unregister_taxonomy(){
    	global $wp_taxonomies;
    	$taxonomy = 'product_type';
    	if ( taxonomy_exists( $taxonomy))
    		unset( $wp_taxonomies[$taxonomy]);
  7. ConceptJulian
    Posted 3 years ago #


    What did you change in - admin/woocommerce-admin-import.php ?

    I changed everything to true, and set the name and value just as your screenshot.

    The products show up on the website, but in the admin the products still are set as Simpel product instead of External product.

    Can you help me? I'm dutch so...

  8. maarten1234
    Posted 3 years ago #

    If you enable those fields, a new categories field comes up on the Settings page:
    fill that one with "external" and all products should appear as External prods.
    Succes ;-)

  9. ConceptJulian
    Posted 3 years ago #

    That works but in so far that i do have to open the posts and save it before it works!

    How did you fix this?


  10. maarten1234
    Posted 3 years ago #

    I deleted all posts (products) and imported the whole feed again :-)

  11. ConceptJulian
    Posted 3 years ago #


    Wow something things can be so simply;)

    Thank you for your help Maarten:)

  12. Minirappen
    Posted 3 years ago #

    Hi Maarten,

    I've been trying to do this aswell but i can't really dertermin if ive a problem with my wordpress or if im bilnd. Where exactly do you go to edit that taxonomy?

    Seems i can't find it after i've set all bools to true.

  13. Soflyy
    Posted 3 years ago #

    It changed. Here's how to do this in WP All Import 3.0: http://www.wpallimport.com/wp-content/uploads/woocosettings.png

    Notice the "external" in the Tags box.

    For anyone reading this thread and looking for WP All Import support, we don't handle it on the WP.org forums. We do answer requests submitted through our support desk in a timely manner: http://www.wpallimport.com/support


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic