Chat on WhatsApp

Disable Wishlist & Compare for Magento 2

Completely disable Magento 2's Wishlist and Compare features across the entire frontend — every button, link, sidebar, cart row action, customer-account tab, widget link, JS handler, and direct URL route.

Magento 2.4.6–2.4.8 PHP 8.1–8.4 Hyva + Luma Ready Free

Key Features:

  • Built for Magento 2
  • MEQP Compliant
  • Hyva + Luma Ready
  • Free Forever

Additional Services

$0.00
In stock
SKU
panth-disable-wishlist-compare
Links
Lifetime Updates Every Magento release
1-Year Free Support Email + WhatsApp
Adobe-Certified Magento 2 Developer
Free Forever No subscription, no upsell
What you get

Everything in the box

Built-in from day one. No add-ons, no upsell, no licence keys to renew.

Built for Magento 2

Completely disable Magento 2's Wishlist and Compare features across the entire frontend - every button, link, sidebar, cart row action, customer-account tab, widget link, JS handler, and direct URL route.

MEQP Compliant

Adobe Magento Extension Quality Program — passes with zero severity-10 violations.

Hyva + Luma Ready

Vanilla JS, no jQuery dependency. Drop-in compatible with both default Luma and Hyva themes.

Free Forever

Lifetime updates with every Magento release. No subscription, no licence keys, no upsells.

Disable Wishlist & Compare — Remove Wishlist and Compare from Magento 2 (Hyva + Luma). Completely disable Magento 2 Wishlist and Compare across the entire frontend. Removes every button, link, sidebar, cart row action, customer-account tab, widget link, and JS handler. 404s /wishlist/* and /catalog/product_compare/* routes. Works identically on Hyva and Luma. Admin toggle, no theme edits.

What it doesCompletely disable Magento 2 Wishlist and Compare across the entire frontend.
🎯Best forMagento 2 stores that prefer free, well-engineered modules over enterprise rentals
CompatibilityMagento 2.4.4 – 2.4.8 · PHP 8.1 – 8.4 · Hyva + Luma
🔓LicenseFree forever · No subscription · MIT-style open source

Engineered for magento 2 disable wishlist, magento disable compare, magento hide wishlist — ships with sensible defaults, full admin controls, and zero JavaScript bloat. Works identically on Hyva and Luma; passes Adobe MEQP with zero severity-10 violations.

magento 2 disable wishlistmagento disable comparemagento hide wishlistmagento hide comparemagento 2 remove wishlist buttonmagento 2 remove compare products

Completely disable Magento 2's Wishlist and Compare features across the entire frontend — every button, link, sidebar, cart row action, customer-account tab, widget link, JS handler, and direct URL route. Works identically on Hyva and Luma. One module, admin toggles, no theme edits.

Many storefronts — single-SKU brands, B2B catalogs, industrial supply, jewellery, wholesale — never want Wishlist or Compare shown. Magento's built-in config flags only cover a handful of surfaces and leave behind broken links, empty sidebars, ghost JS handlers, and 302 redirects to a login page. Panth Disable Wishlist & Compare is a clean, comprehensive kill-switch.


Kishan Savaliya

Top Rated Plus on Upwork

Panth Infotech Agency


Wishlist

Surface Where Mechanism
Header wishlist icon/link Hyva + Luma Layout remove + header template arg override
Wishlist sidebar block Luma Layout remove
Product detail page "Add to Wish List" Hyva + Luma Layout remove (view + related + upsell)
Category list add-to-wishlist buttons Hyva + Luma Layout remove (core + JS helper)
Cart row "Move to Wishlist" action Hyva + Luma Layout remove for all 7 product types
Customer-account side-nav tab Hyva + Luma Layout remove
Luma widget wishlist link (new_grid, new_list, listing) Luma Block plugin empties AbstractProduct::getAddToWishlistUrl()
Magento helper Wishlist\Helper\Data::isAllow() All themes DI plugin forces false
Hyva ViewModel\Wishlist display methods Hyva DI plugin forces false
/wishlist/* direct URL access All themes Predispatch observer → 404 before auth-redirect

Compare

Surface Where Mechanism
Hyva header compare icon Hyva Layout remove + show_compare=false arg override
Core compare header link / sidebar Luma Layout remove
Product detail page "Add to Compare" Hyva + Luma Layout remove (view + related + upsell)
Category list add-to-compare buttons Hyva + Luma Layout remove (core + JS helper)
Luma widget compare link (new_grid, new_list, listing) Luma Block plugin empties AbstractProduct::getAddToCompareUrl()
Hyva ViewModel\ProductCompare display methods Hyva DI plugin forces false
/catalog/product_compare/* direct URL access All themes Controller plugin on Compare::execute → 404

The module combines six complementary mechanisms so every rendering path is covered no matter how a theme or widget decides to emit wishlist/compare markup.

  1. Layout XML removes on default, catalog_product_view, catalog_category_view, catalog_list_item, catalogsearch_result_index, catalogsearch_advanced_result, and checkout_cart_index — removes every named wishlist/compare block Magento core and Hyva declare.
  2. Header-content argument override — Hyva's header.phtml gates the compare/wishlist icons on show_compare / show_wishlist arguments of the header-content block; both forced to false.
  3. Helper plugin on Magento\Wishlist\Helper\Data::isAllow() / isAllowInCart() — forces false so any third-party block that checks the helper drops out silently.
  4. Block plugin on Magento\Catalog\Block\Product\AbstractProduct::getAddToCompareUrl() / getAddToWishlistUrl() — returns empty string, which breaks the if ($block->getAddToCompareUrl()) gate in every Luma widget template (new_grid.phtml, new_list.phtml, listing.phtml) without any template overrides.
  5. Hyva ViewModel plugins on Hyva\Theme\ViewModel\Wishlist and Hyva\Theme\ViewModel\ProductCompareisEnabled, isAllowInCart, showInProductList, showOnProductPage, showCompareSidebar all forced to false.
  6. Route blocking — predispatch event for controller_action_predispatch_wishlist (runs before the customer-session auth redirect, so /wishlist/* returns an honest 404 instead of a 302 to login) plus a controller plugin on Magento\Catalog\Controller\Product\Compare::execute to 404 compare routes. AJAX / POST requests return a JSON stub so stale JS listeners fail quietly.

Requirement Supported
Magento Open Source 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8
Adobe Commerce 2.4.4 — 2.4.8
PHP 8.1, 8.2, 8.3, 8.4
Hyva Theme 1.0+ (fully compatible)
Luma Theme Native support
Panth Core ^1.0 (installed automatically)

composer require mage2kishan/module-disable-wishlist-compare
bin/magento module:enable Panth_Core Panth_DisableWishlistCompare
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

Verify

bin/magento module:status Panth_DisableWishlistCompare
# Module is enabled

Check any page — header icons, PDP buttons, category add-to links, and cart row actions for wishlist/compare should all be gone. /wishlist/ and /catalog/product_compare/ should return 404.


Navigate to Stores → Configuration → Panth Infotech → Disable Wishlist & Compare. A direct link also appears under the Panth Infotech admin sidebar.

Setting Default What it controls
Module Enabled Yes Master switch. If No, all runtime plugins (helper / ViewModel / controller) are disabled.
Disable Wishlist Yes Gates all wishlist-related runtime plugins + route blocking.
Disable Compare Yes Gates all compare-related runtime plugins + route blocking.
Block Direct URL Access Yes When Yes, /wishlist/* and /catalog/product_compare/* return 404. Set to No if you want the routes reachable without the UI.

Note on layout removals: The layout XML removes are module-level — they apply whenever the module is enabled at the CLI. The admin toggles above only affect runtime plugins and route blocking. To restore the UI while keeping the module installed, disable it via CLI (see below).


Option A — keep the module, restore UI

bin/magento module:disable Panth_DisableWishlistCompare
bin/magento cache:flush

Option B — uninstall entirely

bin/magento module:disable Panth_DisableWishlistCompare
composer remove mage2kishan/module-disable-wishlist-compare
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

The compare icon still shows in the Hyva header

You probably hit the edge case where a child theme re-adds header-compare or passes its own show_compare="true" argument to header-content. Confirm by checking var/log/system.log for layout errors, and ensure your child theme's Magento_Theme/layout/default.xml doesn't re-declare show_compare.

/wishlist/ redirects to login (302) instead of 404

Flush the config cache — the predispatch observer reads the "Block Direct URL Access" flag at runtime:

bin/magento cache:flush config

A third-party module re-adds an "Add to Wish List" button

This module plugs every Magento-core integration point. If a third-party module renders its own wishlist button via a custom block, add <referenceBlock name="..." remove="true"/> for that block in a child override or raise an issue.

DI compile fails after composer require

Make sure Panth_Core, Magento_Wishlist, and Magento_Catalog are enabled — they are hard dependencies.


More Information
Module Category Theme & UI
Best For All Sizes

Need this customised?

Talk to Kishan directly — written quote, scope and timeline within 24 hours. No sales call.

WhatsApp

Disable Wishlist & Compare for Magento 2

$0.00
Step up

Customers usually upgrade to