Programmatically change import URL of reference node My question is similar to this guy's from drupal.org:
https://www.drupal.org/node/2283931

But, I have reference nodes that import content from various URLs and I want after each import, to change the (feeds source) URL of the reference node.
I guess I will use hook_feeds_after_import() but how am I going to target the reference node instead of the importer and run a function on that source?
Answering my own question, it's basically the same. The $source object is the node itself, so in my module I called a hook like this:

function MYMODULE_feeds_after_import(FeedsSource $source) {

    //Get the config
    $config = $source-&gt;getConfig();

    //Save the current URL
    $url = $config['FeedsHTTPFetcher']['source'];

    //Run a basic check
    if(strstr($url, 'since')){

        //Do some fancy stuff with it and create a new one

        $newurl = 'http://foo';

        //Save the new configuration in the source node
        $config['FeedsHTTPFetcher']['source'] = $newurl;
        $source-&gt;setConfig($config);
        $source-&gt;save();
    }

}