• Resolved giannisdel81

    (@giannisdel81)


    Hi, is there any way to import a part of a field? I want to import from a field containing a value “50$ discount for this product” only the “50$” part to a certain field.

Viewing 1 replies (of 1 total)
  • Plugin Contributor ImportWP

    (@importwp)

    Hi Giannisdel81,

    Sorry it has taken so long to get back to your, the www.ads-software.com support tickets had slipped under my radar. The best way to modify the data before it is imported is using a custom method: https://www.importwp.com/docs/modifying-dates-using-custom-methods/

    For example if you add the following function to your website:

    function iwphd_capture_first_word($input = '')
    {
        $parts = explode(' ', $input);
        return $parts[0];
    }

    and then in the import field use, replacing {0} with your column/node selection:

    [iwphd_capture_first_word(“{0}”)]

    Using your example text will return 50$

Viewing 1 replies (of 1 total)
  • The topic ‘Import part of field?’ is closed to new replies.