Skip to content

Fix: donor name recording conflict with Charitable plugin - #8292

Open
WayneRocha wants to merge 2 commits into
developfrom
smtnc-1448-givewp-conflict-with-charitable-donor-names-should-not-be
Open

Fix: donor name recording conflict with Charitable plugin#8292
WayneRocha wants to merge 2 commits into
developfrom
smtnc-1448-givewp-conflict-with-charitable-donor-names-should-not-be

Conversation

@WayneRocha

@WayneRocha WayneRocha commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Resolves SMTNC-1448

  1. Have Charitable install and active.

  2. Simply make a new donation logged-out (to create a new donor)

In the current version name will not be recorded.
In the fixed it will.

image image

Description

When both GiveWP and Charitable are active, donor first and last names were not recorded for new donors.

Charitable registers a plugins_loaded hook that reassigns the global $wpdb->donormeta to its own charitable_donormeta table. GiveWP's donor meta operations go through WordPress's add_metadata('donor', …) / get_metadata('donor', …), which resolve the table via _get_meta_table() using that same global. As a result, the first/last name meta was written to Charitable's table instead of give_donormeta, leaving GiveWP's Donor list names blank.

This change makes Give_DB_Meta temporarily re-assert $wpdb->{meta_type}meta to GiveWP's own table around each metadata operation, then restore the previous value so other plugins (like Charitable) are unaffected.

Affects

  • Donor, donation, form, and comment meta read/write operations now re-assert the global meta table name around each operation.

Testing Instructions

  1. Install Charitable and GiveWP on a test site.
  2. Submit a test donation while logged out (to create a new donor).
  3. Confirm the new donor's first and last name appear in the Donors list.

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@linear-code

linear-code Bot commented Aug 19, 2026

Copy link
Copy Markdown

SMTNC-1448

@WayneRocha
WayneRocha marked this pull request as ready for review August 20, 2026 07:17
@WayneRocha

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

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