Skip to content

Fix featured widget review visibility - #2998

Open
RabbiIslamRony wants to merge 1 commit into
developmentfrom
fix/featured-widget-review-visibility
Open

RabbiIslamRony wants to merge 1 commit into
developmentfrom
fix/featured-widget-review-visibility

Conversation

@RabbiIslamRony

@RabbiIslamRony RabbiIslamRony commented Sep 7, 2026

Copy link
Copy Markdown
Member

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Security fix
  • Improvement
  • New Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Text changes
  • Other... Please describe:

Description

The Featured Listings widget rendered rating stars, rating points, and review counts even when Directorist reviews were disabled. This change makes the widget respect the global review setting while preserving the existing output when reviews are enabled.

How to reproduce the issue or how to test the changes

  1. Add the Directorist Featured Listings widget to a sidebar and ensure it has a published featured listing to display.
  2. Go to Directorist > Settings > Listings > Review and disable reviews.
  3. Before this change, the widget still displays rating/review metadata. After this change, the listing remains visible but the rating/review metadata is omitted.
  4. Enable reviews again and confirm the existing rating/review metadata returns.

Before

https://prnt.sc/m_dKc0nKUrF9

After

https://prnt.sc/rjG5WCjOUhKK

Verification

  • php -l templates/widgets/featured-listing.php
  • composer phpcs -- --warning-severity=0 -- templates/widgets/featured-listing.php
  • Runtime render check: reviews disabled = 0 rating-meta blocks; reviews enabled = 1 rating-meta block; the listing rendered in both states.
  • Secure pull_request PHPCS workflow: passed.
  • The duplicate legacy pull_request_target check fails before scanning any file with You must supply at least one file or directory to process; this is a default-branch workflow invocation issue, not a PHPCS violation in this PR.

Any linked issues

TeamSync: https://team.sovware.com/support/directorist/3273

Help Scout: https://secure.helpscout.net/conversation/3370614583/5025

Checklist

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.

1 participant