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(importer): PHP warning when importing donations. #2982

Closed
2 tasks
raftaar1191 opened this issue Apr 2, 2018 · 0 comments
Closed
2 tasks

fix(importer): PHP warning when importing donations. #2982

raftaar1191 opened this issue Apr 2, 2018 · 0 comments
Assignees

Comments

@raftaar1191
Copy link
Contributor

User Story

As an Admin, I don't want to get any PHP notices

Issue Overview

This is an issue is related to Give Importer when i try to import any CSV file and if this add-on is activated I am getting PHP warnings.

Video: https://drive.google.com/file/d/1s2a2WD-y9VbUQo6tpiKKAvWFmP8U6hYa/view?usp=sharing

[28-Feb-2018 09:11:47 UTC] PHP Warning:  Invalid argument supplied for foreach() in /app/public/wp-content/plugins/Give-Zapier/includes/give-zapier-api-hooks.php on line 258
[28-Feb-2018 09:11:47 UTC] PHP Stack trace:
[28-Feb-2018 09:11:47 UTC] PHP   1. {main}() /app/public/wp-admin/admin-ajax.php:0
[28-Feb-2018 09:11:47 UTC] PHP   2. do_action() /app/public/wp-admin/admin-ajax.php:97
[28-Feb-2018 09:11:47 UTC] PHP   3. WP_Hook->do_action() /app/public/wp-includes/plugin.php:453
[28-Feb-2018 09:11:47 UTC] PHP   4. WP_Hook->apply_filters() /app/public/wp-includes/class-wp-hook.php:310
[28-Feb-2018 09:11:47 UTC] PHP   5. call_user_func_array:{/app/public/wp-includes/class-wp-hook.php:286}() /app/public/wp-includes/class-wp-hook.php:286
[28-Feb-2018 09:11:47 UTC] PHP   6. give_donation_import_callback() /app/public/wp-includes/class-wp-hook.php:286
[28-Feb-2018 09:11:47 UTC] PHP   7. give_save_import_donation_to_db() /app/public/wp-content/plugins/Give/includes/admin/admin-actions.php:549
[28-Feb-2018 09:11:47 UTC] PHP   8. give_insert_payment() /app/public/wp-content/plugins/Give/includes/import-functions.php:630
[28-Feb-2018 09:11:47 UTC] PHP   9. Give_Payment->save() /app/public/wp-content/plugins/Give/includes/payments/functions.php:200
[28-Feb-2018 09:11:47 UTC] PHP  10. Give_Payment->update_status() /app/public/wp-content/plugins/Give/includes/payments/class-give-payment.php:837
[28-Feb-2018 09:11:47 UTC] PHP  11. do_action() /app/public/wp-content/plugins/Give/includes/payments/class-give-payment.php:1257
[28-Feb-2018 09:11:47 UTC] PHP  12. WP_Hook->do_action() /app/public/wp-includes/plugin.php:453
[28-Feb-2018 09:11:47 UTC] PHP  13. WP_Hook->apply_filters() /app/public/wp-includes/class-wp-hook.php:310
[28-Feb-2018 09:11:47 UTC] PHP  14. call_user_func_array:{/app/public/wp-includes/class-wp-hook.php:286}() /app/public/wp-includes/class-wp-hook.php:286
[28-Feb-2018 09:11:47 UTC] PHP  15. give_zapier_update_payment_status() /app/public/wp-includes/class-wp-hook.php:286
[28-Feb-2018 09:11:47 UTC] PHP  16. give_zapier_get_donation_data() /app/public/wp-content/plugins/Give-Zapier/includes/give-zapier-api-hooks.php:80
[28-Feb-2018 09:11:47 UTC] PHP  17. give_zapier_get_donation_metadata() /app/public/wp-content/plugins/Give-Zapier/includes/give-zapier-api-hooks.php:220

Expected Behavior

  • Should not getting any PHP warning.

Current Behavior

  • Getting PHP warning when importing the donations.

Related PRs

https://github.com/WordImpress/Give-Zapier/issues/25

Todos

  • Tests
  • Documentation
@raftaar1191 raftaar1191 self-assigned this Apr 2, 2018
raftaar1191 added a commit to raftaar1191/Give that referenced this issue Apr 2, 2018
DevinWalker pushed a commit that referenced this issue Apr 4, 2018
fix(admin-tools): update donation status logic #2982
DevinWalker added a commit that referenced this issue Apr 5, 2018
* release/2.1: (23 commits)
  refactor(form): make goal more performant and add support for donor goal #2986
  refactor(admin-form): add support for donor goal
  refactor(admin-form): add support for displaying goal column
  refactor(admin-form): add support for new donor goal type and remove unused method
  fix(form): enable donor count cache logic
  fix(db-update): return success if zero new update count
  fix(db-update): update update health check logic
  add todo
  style(code): improve fn doc
  fix(form): cache donor count
  refactor(form): move helper fn to forms/functions.php
  style(code): improve code formatting
  feat(helper-function): add fn to get donor count for form
  feat(admin-forms): add new goal screen
  refactor(form-setting): add new option for "Number of Donors" and adjusted the description #2986
  fix(donor-admin-pages): remove # from id for consistency
  fix(donation-detail-page): remove # from id for consistency
  fix(admin-tools): update donation status logic #2982
  feat(admin-tool): change export donor csv name #2964
  refactor(admin-tool): change column name in CSV and checkbox #2964
  ...
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

No branches or pull requests

1 participant