Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: When using the Donor Wall shortcode or block, filtering by only_comments returns no donations #7582

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

alaca
Copy link
Member

@alaca alaca commented Oct 23, 2024

Description

When using the Donor Wall shortcode or block, filtering by only_comments returns no donations.

The problem was that the donor comment was stored in the donation meta table, but we tried to fetch it from the give_comments table which resulted in no donations being returned. The issue is fixed by querying the correct table.

Affects

Donor Wall block/shortcode

Visuals

Screen.Recording.2024-10-23.at.17.57.31.mov

Testing Instructions

  • enable comments either on a per-form basis or at Donations >> Settings >> Default Options
  • using GiveWP, create donations both with and without comments.
  • use this shortcode [give_donor_wall only_comments="true"]
  • or use the Donor Wall block and turn on the Only Comments at Display Elements >> Wall Attributes

Pre-review Checklist

  • Relevant @unreleased tags included in DocBlocks
  • Self Review of code and UX completed

Copy link
Member

@kjohnson kjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we able to cover this with a unit test?

@kjohnson kjohnson changed the title FIX: When using the Donor Wall shortcode or block, filtering by only_comments returns no donations Fix: When using the Donor Wall shortcode or block, filtering by only_comments returns no donations Oct 23, 2024
@kjohnson kjohnson self-requested a review October 28, 2024 15:09
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