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(compat): prevent missing donation data with Restrict Content Pro #2710 #3243

Merged
merged 8 commits into from
May 24, 2018

Conversation

ravinderk
Copy link
Collaborator

@ravinderk ravinderk commented May 22, 2018

Description

This PR will resolve #2710

How Has This Been Tested?

Tested with Restrict content pro 2.9.12

  • Before and After 2.2.0 Give Db upgrades
    • New table in database with exiting data
    • Renamed payment_id column with donation_id
  • With addons
    • Recurring
    • Currency Switcher
    • Fee recovery
  • Tested backward comparibility for $wpdb property paymentmeta
  • WordPress queries for getting payment meta

Screenshots (jpeg or gifs if applicable):

I did not replace$wpdb paymentmeta property to donationmeta in upgrades.php because that is old code and no need to update that code.

image

Checklist:

  • Rename meta type payment --> donation
  • Rename table {*}_give_paymentmeta --> {*}_give_donationmeta
  • Add upgrade routine to rename table and payment_id --> donation_id column
  • Test addon compatibility
  • Write a blog post
  • Create issue for documentation update

@ravinderk ravinderk changed the title Issues/2710 fix(compat): prevent missing donation data with Restrict Content Pro #2710 May 22, 2018
@raftaar1191
Copy link
Contributor

Gettig PHP notice when viewing the Donor single page

Debug log

[24-May-2018 09:32:08 UTC] PHP Warning: Invalid argument supplied for foreach() in /app/public/wp-content/plugins/Give/includes/admin/donors/donors.php on line 342 [24-May-2018 09:32:08 UTC] PHP Stack trace: [24-May-2018 09:32:08 UTC] PHP 1. {main}() /app/public/wp-admin/edit.php:0 [24-May-2018 09:32:08 UTC] PHP 2. require_once() /app/public/wp-admin/edit.php:10 [24-May-2018 09:32:08 UTC] PHP 3. do_action() /app/public/wp-admin/admin.php:224 [24-May-2018 09:32:08 UTC] PHP 4. WP_Hook->do_action() /app/public/wp-includes/plugin.php:453 [24-May-2018 09:32:08 UTC] PHP 5. WP_Hook->apply_filters() /app/public/wp-includes/class-wp-hook.php:310 [24-May-2018 09:32:08 UTC] PHP 6. give_donors_page() /app/public/wp-includes/class-wp-hook.php:286 [24-May-2018 09:32:08 UTC] PHP 7. give_render_donor_view() /app/public/wp-content/plugins/Give/includes/admin/donors/donors.php:117 [24-May-2018 09:32:08 UTC] PHP 8. give_donor_view() /app/public/wp-content/plugins/Give/includes/admin/donors/donors.php:283

image

@raftaar1191
Copy link
Contributor

@ravinderk this #3243 (comment) is not related to the above mention issues

I have create an new issues for this

#3259

Copy link
Contributor

@raftaar1191 raftaar1191 left a comment

Choose a reason for hiding this comment

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

@ravinderk I tested this PR within Give Core as well as will Give Add-on everything is working fine

@DevinWalker DevinWalker merged commit dc33641 into release/2.2 May 24, 2018
ravinderk added a commit that referenced this pull request May 28, 2018
@ravinderk
Copy link
Collaborator Author

@mehul0810 fixed

ravinderk added a commit that referenced this pull request May 28, 2018
@DevinWalker DevinWalker deleted the issues/2710 branch June 5, 2018 16:29
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.

None yet

3 participants