impress-org/givewp-snippet-library

fix: custom-fields-plugin.php does not pass info to Payment Meta or Transaction Details

samsmith89 opened this issue · 2 comments

User Story

As a developer, I want to be able to pass the information that is captured by the forms custom field to the payment meta so that it can be viewed in the donation details.

This would also be useful information to be able to export to CSV

Current Behavior

I currently can only view this data if I have the custom template tag placed inside the outbound email.

Expected Behavior

I expect to be able to view this information when I visit the donation details and have the ability to export this data to CSV.

Steps to Reproduce

  1. Make the needed modifications to the plugin
  2. Upload and activate the plugin
  3. Put the newly added template tag in an outbound email
  4. Submit a donation with information in the required custom field created
  5. View the donation in the admin of the site, and see that none of the information displays
  6. Export a CSV, notice that none of the info is in it
  7. Veiw the outbound email and see the information from the custom field

Visuals

screen shot 2018-03-30 at 8 37 54 am

screen shot 2018-03-30 at 8 38 17 am

Related

https://secure.helpscout.net/conversation/551230811/16113?folderId=672194

Tasks

Environment

``` ### WordPress Environment ###

Home URL: http://give.local
Site URL: http://give.local
WP Version: 4.9.4
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ✔
Language: en_US
Permalink Structure: /%postname%/
Show on Front: posts
Table Prefix Length: wp_
Table Prefix Length: 3
Table Prefix Status: Acceptable
Admin AJAX: Accessible
Registered Post Statuses: publish, future, draft, pending, private, trash, auto-draft, inherit, refunded, failed, revoked, cancelled, abandoned, processing, preapproval, give_subscription

Server Environment

Hosting Provider: DBH: localhost, SRV: give.local
TLS Connection: Connection uses TLS 1.2
TLS Connection: Probably Okay
Server Info: Apache/2.4.10 (Debian)
PHP Version: 7.0.3
PHP Post Max Size: 1,000 MB
PHP Time Limit: 900
PHP Max Input Vars: 3000
PHP Max Upload Size: 1,000 MB
cURL Version: ❌ 7.38.0, OpenSSL/1.0.1t - We recommend a minimum cURL version of 7.40.
SUHOSIN Installed: –
MySQL Version: 5.6.34
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
gzip: ✔
GD Graphics Library: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Give Configuration

Give Version: 2.0.7
Give Cache: Enabled
Database Updates: All DB Updates Completed.
Give Cache: Enabled
Give Cache: ✔New Donation✔Donation Receipt❌New Offline Donation❌Offline Donation Instructions✔New User Registration✔User Registration Information✔Email access❌Renewal Receipt Email❌Subscription Cancelled Email
Upgraded From: 2.0.7
Test Mode: Enabled
Currency Code: EUR
Currency Position: Before
Decimal Separator: .
Thousands Separator: ,
Success Page: http://give.local/donation-confirmation/
Failure Page: http://give.local/donation-failed/
Donation History Page: http://give.local/donation-history/
Give Forms Slug: /donations/
Enabled Payment Gateways: Test Donation
Default Payment Gateway: Test Donation
PayPal IPN Verification: Enabled
PayPal IPN Notifications: N/A
Donor Email Access: Enabled

Session Configuration

Give Use Sessions: Enabled
Session: Disabled

Active Give Add-ons

Give - Authorize.net Gateway: ❌ Unlicensed – by WordImpress – 1.3.3
Give - Braintree Gateway: ❌ Unlicensed – by WordImpress – 1.2
Give - CSV Toolbox: ❌ Unlicensed – by WordImpress – 1.0
Give - Currency Switcher: ❌ Unlicensed – by WordImpress – 1.0.3
Give - Fee Recovery: ❌ Unlicensed – by WordImpress – 1.5
Give - Form Field Manager: ❌ Unlicensed – by WordImpress – 1.2.8
Give - Manual Donations: ❌ Unlicensed – by WordImpress – 1.3.2
Give - PayPal Pro Gateway: ❌ Unlicensed – by WordImpress – 1.1.4
Give - PDF Receipts: ❌ Unlicensed – by WordImpress – 2.2.5
Give - Per Form Gateways: ❌ Unlicensed – by WordImpress – 1.0
Give - Recurring Donations: ❌ Unlicensed – by WordImpress – 1.5.7
Give - Sofort Payment Gateway: ❌ Unlicensed – by WordImpress, CoachBirgit – 1.0
Give - Stripe Gateway: ❌ Unlicensed – by WordImpress – 1.5.2
Give - Tributes: ❌ Unlicensed – by WordImpress – 1.4.1

Other Active Plugins

Email Cop: by Ashfame – 0.1.1
Give - Custom Field Integration: by WordImpress – 1.0
Give - Hook Helper: by Ravinder Kumar – 1.0

Inactive Plugins

Duplicate Post: by Enrico Battocchi – 3.2.1
My Custom Functions: by Arthur Gareginyan – 4.13
Sam's Helper Function: by WordImpress – 1.0

Theme

Name: Twenty Seventeen
Version: 1.4
Author URL: https://wordpress.org/
Child Theme: No – If you're modifying Give on a parent theme you didn't build personally, then we recommend using a child theme. See: How to Create a Child Theme

</details>

@samsmith89 This issue is related to a deprecated hook in the Donation Details screen, per this announcement:
https://developers.givewp.com/2018/03/19/legacy-hooks-being-deprecated-within-2-0-7/

So, the snippet will still work, but with WP_DEBUG on it will show a PHP warning that the hook is deprecated. After 2.1 is released we should update the action as follows:

give_view_order_details_billing_before => give_view_donation_details_billing_before

Closing - old as a mofo.