Skip to content

Conversation

itaymesh
Copy link

Description:

Overview

This PR updates the ProductGalleryHelper::isHyvaThemeEnabled() method to use DesignInterface instead of ThemeProvider, ensuring accurate detection of Hyvä-based themes, including child themes.

Changes:

  • Replaced ThemeProvider with DesignInterface to align with \Hyva\Theme\Service\CurrentTheme::isHyva().
  • Updated isHyvaThemeEnabled() to check parent themes recursively for better Hyvä theme detection.
  • Injected DesignInterface via constructor to follow Magento's best practices.

Why This Change?

  • Ensures compatibility with Hyvä child themes.
  • Matches Hyvä’s official approach to theme detection.
  • Reduces direct reliance on ThemeProvider and ScopeConfigInterface for theme resolution.

Notes:

  • This change does not affect existing functionality beyond improving Hyvä theme detection.

  • No other parts of the class were refactored to maintain scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants