• Resolved s00001000

    (@s00001000)


    Does anyone have experience cleaning data during the import? For example, extracting a file name from a non-cleaned URL and appending it to a clean URL. Is this possible?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @s00001000

    For example, extracting a file name from a non-cleaned URL and appending it to a clean URL. Is this possible?

    You could use a PHP function to do that: whttps://www.wpallimport.com/documentation/developers/custom-code/inline-php/. Here’s an example function that you can modify as needed:

    function my_fix_imageurl( $imageurl ) {
        $new_url        = 'https://example.com/';
        $image_name     = basename( $imageurl );
        $new_image_url  = $new_url . $image_name;
    
        return $new_image_url;
    }

    You’ll also find a lot more examples here: https://www.wpallimport.com/documentation/developers/code-snippets/.

    Thread Starter s00001000

    (@s00001000)

    Resolved – thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cleaning Data from CSV’ is closed to new replies.