Product Description

Pending

Import WP Pro Updated 3 weeks ago 5 Replies

Ash asked 1 month ago on October 8, 2025 at 3:30 pm

Hi

Feed has several description fields to make up the description. Now I want them bullet pointed so wrapped each one, they import fine all bullet pointed. But not all products use all the fields and are left blank so I’m ending up with empty bullet pointed lines when imported. Anway to check for emty lines and don’t import them? Thanks

 

 

  •  

    • {/desc_1}
    • {/desc_2}
    • {/desc_3}
    • {/desc_4}
    • {/desc_5}
    • {/desc_6}
    • {/desc_7}
    • {/desc_8}
    • {/desc_9}
    • {/desc_10}
    • {/desc_standard}

 

 

  •  

 

J

James replied Support Agent

4 weeks ago on October 9, 2025 at 8:58 am

Hi Ash,

The best way to solve this that i can think of it to create a custom function/method (https://www.importwp.com/docs/modifying-dates-using-custom-methods/) that takes in  all the descriptions and returns the output that you require.

For example the following custom function if added to your website (attached as a plugin for ease of use)

function iwphd1359_desc_list(...$texts)
{

    $output = '';

    $texts = array_values(array_filter(array_map('trim', (array)$texts)));
    if (empty($texts)) {
        return $output;
    }

    return '<ul><li>' . implode('</li><li>', $texts) . '</li></ul>';
}

Could then be used like so in the importer template field for your description, replacing what you currently have:

[iwphd1359_desc_list("{/desc_1}","{/desc_2}","{/desc_3}","{/desc_4}","{/desc_5}","{/desc_6}","{/desc_7}","{/desc_8}","{/desc_9}","{/desc_10}","{/desc_standard}")]

James

AM

Ash replied

4 weeks ago on October 9, 2025 at 9:16 am

Brilliant, that worked!

I have 2 more issues.

 

1. Dimensions in my file are all in one column "16 x 20.9 x 1.2" 

Anyway to split this to be used in length,width,height fields?

 

2. I'm trying to change "Tax Class" as some products only require 'Shipping only' tax. I mapped as follows

 

Tax Status (text field): {7}

Field map:

Equals: Y Return: Taxable

Equals: N Return: Shipping only

 

Ran it but nothing changed. So I cleared that and just selected Shippping only from the dropdown and ran it as a test and it still didn't change the tax class?

 

Many thanks

 

 

J

James replied Support Agent

4 weeks ago on October 9, 2025 at 8:15 pm

I have updated the attached plugin with the following function

function iwphd1359_seperate_dimensions($input = '', $part = 0)
{
    $parts = array_map('trim', explode('x', $input));
    return isset($parts[$part]) ? $parts[$part] : '';
}

This allows you to extract the first, second, and third section of the dimensions

For example you would use it like so:

[iwphd1359_seperate_dimensions("{/dimension_selector}", "0")]

changing the "0" , to "0", "1", or "2" to get either 16, 20.9, or 1.2

As for the not saving issue of the tax class and tax status, an update should now be available for the importwp-woocommerce plugin that should fix this, otherwise you can download it manually from the website.

In regards to your field map, the best way to find the values that should be set, is under the tax status field for example, if you uncheck the "enable text field", then select a value and then check the enable text field checkbox it will show you what the value should be that it is expecting e.g. "shipping only" is "shipping".

Hope this helps.
James

AM

Ash replied

3 weeks ago on October 18, 2025 at 10:28 am

Thank you.

Also for product images when importing from a single location seperated by comma, if I set featured to 'Yes' I'm ending up with the first image set as featured and that same image is also added to the gallery, so the first image is duplicated on the product page?

J

James replied Support Agent

3 weeks ago on October 20, 2025 at 6:04 pm

Hi Ash,

When you say gallery, is this just images attached to the post?

Can you please export and attach your importer settings to this ticket by going to Tools > Import WP > Settings / Tools > Import / Export and select and export your importer as a JSON file.

And also attach your example csv/xml file

James