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
Pay with Wise
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.

Overview

Panth Disable Wishlist & Compare is a kill-switch extension for Magento 2 and Adobe Commerce that removes the Wishlist and Compare features from every storefront surface with four admin toggles.

Magento's built-in configuration flags only cover a handful of surfaces and leave behind broken links, empty sidebars, ghost JS handlers, and 302 redirects to the login page. This extension goes further: header icons, sidebar blocks, product detail buttons, category list add-to-wishlist controls, cart row Move-to-Wishlist actions, customer-account side-nav tabs, widget links, JS handlers, and direct URL routes are all neutralized cleanly on both Hyvä and Luma.

Four admin toggles under Stores → Configuration → Panth Infotech default to Yes and apply immediately after cache flush, so single-SKU brands, B2B catalogs, industrial supply, jewellery, and wholesale stores can hide both features without theme edits or core modifications.

Compatible with Magento 2.4.4–2.4.9 on PHP 8.1–8.4, MEQP-compliant, and reversible at any time by flipping the toggles back to No.

Best for:

  • Single-SKU brands and configurator stores where Wishlist behavior makes no commercial sense.
  • B2B, wholesale, and industrial catalogs that want to remove Compare clutter for buyers.
  • Hyvä storefronts that need a clean kill-switch instead of patching templates manually.

What you get

Panth Disable Wishlist & Compare removes both features cleanly on Magento 2:

  • Four admin toggles for Wishlist frontend, Wishlist routes, Compare frontend, and Compare routes.
  • Removes header, sidebar, product-detail, category-list, and cart-row entry points.
  • Hides customer-account tabs, widget links, and direct URL routes on Hyvä and Luma.
  • Layout removes, block plugins, and route guards — no theme edits required.
  • Reversible at any time; MEQP-compliant on Magento 2.4.4–2.4.9 with PHP 8.1–8.4.

Panth Disable Wishlist & Compare — Remove Wishlist and Compare from Magento 2 (Hyva + Luma)

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.


Preview

Admin Configuration

Admin Configuration

Stores → Configuration → Panth Infotech → Disable Wishlist & Compare — four toggles, all default to Yes, applied immediately after cache flush.


What This Disables

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

How It Works

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.

Admin Toggles

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).


Restoring the UI

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

Troubleshooting

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.


Compatibility

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)

Installation

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.


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