PHPackages                             mage2kishan/module-disable-wishlist-compare - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mage2kishan/module-disable-wishlist-compare

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

mage2kishan/module-disable-wishlist-compare
===========================================

Disable Wishlist and Compare functionality across the entire Magento 2 frontend (works on Hyva and Luma).

1.0.4(1mo ago)013↓100%proprietaryPHPPHP ~8.1.0||~8.2.0||~8.3.0||~8.4.0

Since Apr 20Pushed 1mo agoCompare

[ Source](https://github.com/mage2sk/module-disable-wishlist-compare)[ Packagist](https://packagist.org/packages/mage2kishan/module-disable-wishlist-compare)[ RSS](/packages/mage2kishan-module-disable-wishlist-compare/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

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

[](#panth-disable-wishlist--compare--remove-wishlist-and-compare-from-magento-2-hyva--luma)

[![Magento 2.4.4 - 2.4.8](https://camo.githubusercontent.com/079c832211eed4f9451ebe264e3865f825b0f9f31b041cbf03676c6e254535d4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6167656e746f2d322e342e342532302d2d253230322e342e382d6f72616e67653f6c6f676f3d6d6167656e746f266c6f676f436f6c6f723d7768697465)](https://magento.com)[![PHP 8.1 - 8.4](https://camo.githubusercontent.com/56b3cce18841623e2cbed2ebf09b06be1be8807e99e6e054a89d304ab4790b8e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532302d2d253230382e342d626c75653f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://php.net)![License: Proprietary](https://camo.githubusercontent.com/958a686bca30b64428b7c382fde17cb2f6457efe3d39db6fe0c8e6fa45623276/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d50726f70726965746172792d726564)[![Packagist](https://camo.githubusercontent.com/c53b689d16d366e56a6b29d357bd70a6b31d4a1b7febe9651ad279d80f0afcab/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5061636b61676973742d6d616765326b697368616e2532466d6f64756c652d2d64697361626c652d2d776973686c6973742d2d636f6d706172652d6f72616e67653f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/mage2kishan/module-disable-wishlist-compare)[![Hyva Compatible](https://camo.githubusercontent.com/14365166e02048aff917dd0a015feecdae28499fbde05fa17abd4f7821ea1139/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f487976612d436f6d70617469626c652d3134623861363f6c6f676f3d616c70696e65646f746a73266c6f676f436f6c6f723d7768697465)](https://hyva.io)![Luma Compatible](https://camo.githubusercontent.com/3c1945ee121ef64870a6f3583c91ffdfb4d8ffc35809e7ce34ca549a357e1ded/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c756d612d436f6d70617469626c652d6f72616e6765)[![Upwork Top Rated Plus](https://camo.githubusercontent.com/6f72584179420c41ed90432fd2579a4ed36199d4229e8181d20f353c1c4ee4eb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5570776f726b2d546f702532305261746564253230506c75732d3134613830303f6c6f676f3d7570776f726b266c6f676f436f6c6f723d7768697465)](https://www.upwork.com/freelancers/~016dd1767321100e21)[![Panth Infotech Agency](https://camo.githubusercontent.com/401a792e990131002e91054d1b04494af5a2152fcc891ca000eb683786770abf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4167656e63792d50616e7468253230496e666f746563682d3134613830303f6c6f676f3d7570776f726b266c6f676f436f6c6f723d7768697465)](https://www.upwork.com/agencies/1881421506131960778/)[![Website](https://camo.githubusercontent.com/f1ae86d28e2b505aee60f240d3e5508e390b0a8dc7a9b7ecf1b450fad862053f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f576562736974652d6b697368616e736176616c6979612e636f6d2d304439343838)](https://kishansavaliya.com)[![Get a Quote](https://camo.githubusercontent.com/0b6c02cc1ad00f11bf1b0164a9998734bd716473db36cc2a5c1517e3d3578d1b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4765742532306125323051756f74652d46726565253230457374696d6174652d444332363236)](https://kishansavaliya.com/get-quote)

> **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 &amp; Compare** is a clean, comprehensive kill-switch.

---

Preview
-------

[](#preview)

### Admin Configuration

[](#admin-configuration)

[![Admin Configuration](docs/admin-configuration.png)](docs/admin-configuration.png)

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

---

Need Custom Magento 2 Development?
----------------------------------

[](#need-custom-magento-2-development)

 [ ![Get a Free Quote](https://camo.githubusercontent.com/eac8c45d21cff8b139ddc392325f3bd6c8266a6f3d7b23f15131c958f3d3c8d0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476574253230612532304672656525323051756f74652532302545322538362539322d5265706c7925323077697468696e2532303234253230686f7572732d4443323632363f7374796c653d666f722d7468652d6261646765) ](https://kishansavaliya.com/get-quote)

### Kishan Savaliya

[](#kishan-savaliya)

**Top Rated Plus on Upwork**

[![Hire on Upwork](https://camo.githubusercontent.com/b69353d3c6e192f4d03cc36bb8883612004e32f54dd2dbcc1e700dd791acd875/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f486972652532306f6e2532305570776f726b2d546f702532305261746564253230506c75732d3134613830303f7374796c653d666f722d7468652d6261646765266c6f676f3d7570776f726b266c6f676f436f6c6f723d7768697465)](https://www.upwork.com/freelancers/~016dd1767321100e21)

### Panth Infotech Agency

[](#panth-infotech-agency)

[![Visit Agency](https://camo.githubusercontent.com/bbf04bdd2aff502082508568ec42ace3a7475c98756f596e2013056c89726ed6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f56697369742532304167656e63792d50616e7468253230496e666f746563682d3134613830303f7374796c653d666f722d7468652d6261646765266c6f676f3d7570776f726b266c6f676f436f6c6f723d7768697465)](https://www.upwork.com/agencies/1881421506131960778/)

---

Table of Contents
-----------------

[](#table-of-contents)

- [What This Disables](#what-this-disables)
- [How It Works](#how-it-works)
- [Compatibility](#compatibility)
- [Installation](#installation)
- [Admin Toggles](#admin-toggles)
- [Restoring the UI](#restoring-the-ui)
- [Troubleshooting](#troubleshooting)
- [Support](#support)

---

What This Disables
------------------

[](#what-this-disables)

### Wishlist

[](#wishlist)

SurfaceWhereMechanismHeader wishlist icon/linkHyva + LumaLayout remove + header template arg overrideWishlist sidebar blockLumaLayout removeProduct detail page "Add to Wish List"Hyva + LumaLayout remove (view + related + upsell)Category list add-to-wishlist buttonsHyva + LumaLayout remove (core + JS helper)Cart row "Move to Wishlist" actionHyva + LumaLayout remove for all 7 product typesCustomer-account side-nav tabHyva + LumaLayout removeLuma widget wishlist link (`new_grid`, `new_list`, `listing`)LumaBlock plugin empties `AbstractProduct::getAddToWishlistUrl()`Magento helper `Wishlist\Helper\Data::isAllow()`All themesDI plugin forces falseHyva `ViewModel\Wishlist` display methodsHyvaDI plugin forces false`/wishlist/*` direct URL accessAll themesPredispatch observer → 404 *before* auth-redirect### Compare

[](#compare)

SurfaceWhereMechanismHyva header compare iconHyvaLayout remove + `show_compare=false` arg overrideCore compare header link / sidebarLumaLayout removeProduct detail page "Add to Compare"Hyva + LumaLayout remove (view + related + upsell)Category list add-to-compare buttonsHyva + LumaLayout remove (core + JS helper)Luma widget compare link (`new_grid`, `new_list`, `listing`)LumaBlock plugin empties `AbstractProduct::getAddToCompareUrl()`Hyva `ViewModel\ProductCompare` display methodsHyvaDI plugin forces false`/catalog/product_compare/*` direct URL accessAll themesController plugin on `Compare::execute` → 404---

How It Works
------------

[](#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\ProductCompare` — `isEnabled`, `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.

---

Compatibility
-------------

[](#compatibility)

RequirementSupportedMagento Open Source2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8Adobe Commerce2.4.4 — 2.4.8PHP8.1, 8.2, 8.3, 8.4Hyva Theme1.0+ (fully compatible)Luma ThemeNative supportPanth Core^1.0 (installed automatically)---

Installation
------------

[](#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

[](#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.

---

Admin Toggles
-------------

[](#admin-toggles)

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

SettingDefaultWhat it controls**Module Enabled**YesMaster switch. If No, all runtime plugins (helper / ViewModel / controller) are disabled.**Disable Wishlist**YesGates all wishlist-related runtime plugins + route blocking.**Disable Compare**YesGates all compare-related runtime plugins + route blocking.**Block Direct URL Access**YesWhen 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
----------------

[](#restoring-the-ui)

### Option A — keep the module, restore UI

[](#option-a--keep-the-module-restore-ui)

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

### Option B — uninstall entirely

[](#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
---------------

[](#troubleshooting)

### The compare icon still shows in the Hyva header

[](#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

[](#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

[](#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 `` for that block in a child override or raise an issue.

### DI compile fails after `composer require`

[](#di-compile-fails-after-composer-require)

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

---

Support
-------

[](#support)

- **Issues:** [github.com/mage2sk/module-disable-wishlist-compare/issues](https://github.com/mage2sk/module-disable-wishlist-compare/issues)
- **Agency:** [Panth Infotech on Upwork](https://www.upwork.com/agencies/1881421506131960778/)
- **Direct:** [kishansavaliya.com](https://kishansavaliya.com) — [Get a free quote](https://kishansavaliya.com/get-quote)

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance94

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

5

Last Release

33d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/343e344aa298f189db888b32d62f9202d31ced1a5ea23411850a63dc4a30299c?d=identicon)[kishansavaliya](/maintainers/kishansavaliya)

---

Top Contributors

[![KishanSavaliya](https://avatars.githubusercontent.com/u/16853223?v=4)](https://github.com/KishanSavaliya "KishanSavaliya (5 commits)")

---

Tags

comparewishlistdisablemagento2magento2 modulehyvaluma

### Embed Badge

![Health badge](/badges/mage2kishan-module-disable-wishlist-compare/health.svg)

```
[![Health](https://phpackages.com/badges/mage2kishan-module-disable-wishlist-compare/health.svg)](https://phpackages.com/packages/mage2kishan-module-disable-wishlist-compare)
```

###  Alternatives

[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68353.9k](/packages/run-as-root-magento2-prometheus-exporter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
