Plugin Multi-Environment config not working I have set up the plugin's multi-environment configuration as outlined in this answer.

The config.php file for the plugin is as follows:

&lt;?php

return array(
    // All
    '*' =&gt; array(
    ),

    // Development
    '.domain.dev' =&gt; array(
        'apiKey' =&gt; 'APIKEYDEVVALUE'
    ),

    // Staging
    'dev.domain.com' =&gt; array(
        'apiKey' =&gt; 'APIKEYSTAGINGVALUE'
    ),

    // Production
    'dev.domain.com' =&gt; array(
        'apiKey' =&gt; 'APIKEYPRODVALUE'
    ),
);


But calling craft()-&gt;config-&gt;get('apiKey', 'pluginhandle') returns null.

If I var_dump(craft()-&gt;config) I can see that the config file for the plugin is loaded by craft.

What am I missing?  Please let me know if I can provide any more useful info.
The issue is that you're putting the multi-environment config code in your plugins/pluginHandle/config.php file, which is just meant to supply default plugin config values.

Users can set custom values in craft/config/pluginHandle.php which is where the multi-environment logic would also go.