<div dir="ltr"><div><div>Hi,<br><br></div>please update the code to add a WMS layer in the cookbook:<br><br><a href="http://www.qgis.org/en/docs/pyqgis_developer_cookbook/loadlayer.html">http://www.qgis.org/en/docs/pyqgis_developer_cookbook/loadlayer.html</a><br>

<br></div>that code is compatible only with Qgis 1.x<br>
</div>