{"id":20426,"date":"2021-07-01T13:55:49","date_gmt":"2021-07-01T10:55:49","guid":{"rendered":"https:\/\/plumrocket.com\/docs\/?p=20426"},"modified":"2021-09-24T04:59:51","modified_gmt":"2021-09-24T08:59:51","slug":"disable-newsletter-popup-manually","status":"publish","type":"post","link":"https:\/\/plumrocket.com\/docs\/magento-newsletter-popup\/v3\/devguide\/disable-manually","title":{"rendered":"Disable Newsletter Popup Manually"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To disable the <a href=\"\/magento-newsletter-popup\">Newsletter popup extension<\/a> in your Magento 2 manually, you need to add this code to the XML layout:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-markup\" data-line=\"\">&lt;referenceBlock name=&quot;newsletter.popup&quot;&gt;\n    &lt;action method=&quot;disable&quot; \/&gt;\n&lt;\/referenceBlock&gt;<\/code><\/pre><\/div>\n\n\n<div class=\"example-block\">\n<p class=\"example-block-title\">Code Example<\/p>\n<div class=\"wp-block-prismatic-blocks\">\n<div><\/div>\n<pre data-line=\"3-5\"><code class=\"language-markup\" data-line=\"\">&lt;body&gt;\n        &lt;referenceContainer name=&quot;root&quot;&gt;\n            &lt;referenceBlock name=&quot;newsletter.popup&quot;&gt;\n                &lt;action method=&quot;disable&quot; \/&gt;\n            &lt;\/referenceBlock&gt;\n            ....\n        &lt;\/referenceContainer&gt;\n    &lt;\/body&gt;<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">In order to disable Newsletter Popup Extension using controller class, please use the following code:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\" data-line=\"\">$newsletterBlock = $this-&gt;_view-&gt;loadLayout()-&gt;getLayout()-&gt;getBlock(&#039;newsletter.popup&#039;);\nif ($newsletterBlock) {\n    $newsletterBlock-&gt;disable();\n}<\/code><\/pre><\/div>\n\n\n<div class=\"example-block\">\n<p class=\"example-block-title\">Code Example<\/p>\n<div class=\"wp-block-prismatic-blocks\">\n<div><\/div>\n<pre data-line=\"8-12\"><code class=\"language-php\" data-line=\"\">namespace MagentoContactControllerIndex;\n    \n    class Index extends MagentoContactControllerIndex\n    {\n         public function execute()\n         {\n              $this-&gt;_view-&gt;loadLayout();\n              $newsletterBlock = $this-&gt;_view-&gt;loadLayout()-&gt;getLayout()\n                  -&gt;getBlock(&#039;newsletter.popup&#039;);\n    \n             if ($newsletterBlock) {\n                 $newsletterBlock-&gt;disable();\n             }\n    \n             $this-&gt;_view-&gt;renderLayout();\n         }\n    }<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To disable the Newsletter popup extension in your Magento 2 manually, you need to add this code to the XML layout: Code Example &lt;body&gt; &lt;referenceContainer name=&quot;root&quot;&gt; &lt;referenceBlock name=&quot;newsletter.popup&quot;&gt; &lt;action method=&quot;disable&quot; \/&gt; &lt;\/referenceBlock&gt; &#8230;. &lt;\/referenceContainer&gt; &lt;\/body&gt; In order to disable Newsletter Popup Extension using controller class, please use the following code: Code Example namespace MagentoContactControllerIndex; class &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/plumrocket.com\/docs\/magento-newsletter-popup\/v3\/devguide\/disable-manually\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Disable Newsletter Popup Manually&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[285],"tags":[],"class_list":["post-20426","post","type-post","status-publish","format-standard","hentry","category-magento-newsletter-popup-v3-devguide","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v17.2 (Yoast SEO v28.1) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Disable Newsletter Popup Manually - Plumrocket Documentation<\/title>\n<meta name=\"description\" content=\"To disable the Newsletter popup extension in your Magento 2 manually, you need to add this code to the XML layout: &lt;referenceBlock\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/plumrocket.com\/docs\/magento-newsletter-popup\/v4\/devguide\/disable-manually\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Disable Newsletter Popup Manually\" \/>\n<meta property=\"og:description\" content=\"To disable the Newsletter popup extension in your Magento 2 manually, you need to add this code to the XML layout: &lt;referenceBlock\" \/>\n<meta property=\"og:url\" content=\"\/docs\/magento-newsletter-popup\/v4\/devguide\/disable-manually\" \/>\n<meta property=\"og:site_name\" content=\"Plumrocket Documentation\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-01T10:55:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-24T08:59:51+00:00\" \/>\n<meta name=\"author\" content=\"Plumrocket\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Plumrocket\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Disable Newsletter Popup Manually - Plumrocket Documentation","description":"To disable the Newsletter popup extension in your Magento 2 manually, you need to add this code to the XML layout: &lt;referenceBlock","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/plumrocket.com\/docs\/magento-newsletter-popup\/v4\/devguide\/disable-manually","og_locale":"en_US","og_type":"article","og_title":"Disable Newsletter Popup Manually","og_description":"To disable the Newsletter popup extension in your Magento 2 manually, you need to add this code to the XML layout: &lt;referenceBlock","og_url":"\/docs\/magento-newsletter-popup\/v4\/devguide\/disable-manually","og_site_name":"Plumrocket Documentation","article_published_time":"2021-07-01T10:55:49+00:00","article_modified_time":"2021-09-24T08:59:51+00:00","author":"Plumrocket","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Plumrocket","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"\/docs\/magento-newsletter-popup\/v4\/devguide\/disable-manually#article","isPartOf":{"@id":"https:\/\/plumrocket.com\/docs\/magento-newsletter-popup\/v3\/devguide\/disable-manually"},"author":{"name":"Plumrocket","@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/38b360639b934d6c984ee4f3ffce7d20"},"headline":"Disable Newsletter Popup Manually","datePublished":"2021-07-01T10:55:49+00:00","dateModified":"2021-09-24T08:59:51+00:00","mainEntityOfPage":{"@id":"https:\/\/plumrocket.com\/docs\/magento-newsletter-popup\/v3\/devguide\/disable-manually"},"wordCount":43,"articleSection":["Developer Guide"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/plumrocket.com\/docs\/magento-newsletter-popup\/v3\/devguide\/disable-manually","url":"\/docs\/magento-newsletter-popup\/v4\/devguide\/disable-manually","name":"Disable Newsletter Popup Manually - Plumrocket Documentation","isPartOf":{"@id":"https:\/\/plumrocket.com\/docs\/#website"},"datePublished":"2021-07-01T10:55:49+00:00","dateModified":"2021-09-24T08:59:51+00:00","author":{"@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/38b360639b934d6c984ee4f3ffce7d20"},"description":"To disable the Newsletter popup extension in your Magento 2 manually, you need to add this code to the XML layout: &lt;referenceBlock","breadcrumb":{"@id":"\/docs\/magento-newsletter-popup\/v4\/devguide\/disable-manually#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["\/docs\/magento-newsletter-popup\/v4\/devguide\/disable-manually"]}]},{"@type":"BreadcrumbList","@id":"\/docs\/magento-newsletter-popup\/v4\/devguide\/disable-manually#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Magento 2 Extensions","item":"https:\/\/plumrocket.com\/magento-extensions"},{"@type":"ListItem","position":2,"name":"Magento 2 Newsletter Popup","item":"https:\/\/plumrocket.com\/magento-newsletter-popup"},{"@type":"ListItem","position":3,"name":"Documentation","item":"https:\/\/plumrocket.com\/docs\/magento-newsletter-popup"},{"@type":"ListItem","position":4,"name":"v3","item":"https:\/\/plumrocket.com\/docs\/magento-newsletter-popup\/v3"},{"@type":"ListItem","position":5,"name":"Developer Guide","item":"https:\/\/plumrocket.com\/docs\/magento-newsletter-popup\/v3\/devguide"},{"@type":"ListItem","position":6,"name":"Disable Manually"}]},{"@type":"WebSite","@id":"https:\/\/plumrocket.com\/docs\/#website","url":"https:\/\/plumrocket.com\/docs\/","name":"Plumrocket Documentation","description":"Extensions docs, troubleshootings etc.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/plumrocket.com\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/38b360639b934d6c984ee4f3ffce7d20","name":"Plumrocket","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/85ed2f38dbe6a031f443b1949101e9b31bbd6985eae2cac6695629e7ad280aee?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/85ed2f38dbe6a031f443b1949101e9b31bbd6985eae2cac6695629e7ad280aee?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/85ed2f38dbe6a031f443b1949101e9b31bbd6985eae2cac6695629e7ad280aee?s=96&d=mm&r=g","caption":"Plumrocket"},"sameAs":["https:\/\/plumrocket.com\/docs"]}]}},"_links":{"self":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/20426","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/comments?post=20426"}],"version-history":[{"count":2,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/20426\/revisions"}],"predecessor-version":[{"id":24375,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/20426\/revisions\/24375"}],"wp:attachment":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/media?parent=20426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/categories?post=20426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/tags?post=20426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}