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

Deprecating the second $_POST parameter #2663

Closed
2 tasks done
raftaar1191 opened this issue Jan 17, 2018 · 2 comments
Closed
2 tasks done

Deprecating the second $_POST parameter #2663

raftaar1191 opened this issue Jan 17, 2018 · 2 comments
Assignees

Comments

@raftaar1191
Copy link
Contributor

raftaar1191 commented Jan 17, 2018

Issue Overview

We should deprecate the second parameter of this action as this is a global variable which is access able global so we do not need to pass this with parameter

image

https://github.com/WordImpress/Give/blob/release/2.0/includes/process-donation.php#L66

Related PR & Issues

https://github.com/WordImpress/Give-Tributes/issues/230
https://github.com/WordImpress/Give-Recurring-Donations/issues/501
https://github.com/WordImpress/Give-Stripe/issues/119
https://github.com/WordImpress/Give-Gift-Aid/issues/86

Expected Behavior

Should not pass the global access variable through parameter

Current Behavior

Passing the $_POST value from parameter

Todos

  • Tests
  • Documentation

WordPress Environment

``` ### WordPress Environment ###

Home URL: http://give18.local
Site URL: http://give18.local
WP Version: 4.9.2
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: ✔
WP Cron: ✔
Language: en_US
Permalink Structure: /%year%/%monthnum%/%day%/%postname%/
Show on Front: posts
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

Server Environment

Hosting Provider: DBH: localhost, SRV: give18.local
TLS Connection: Connection uses TLS 1.2
TLS Connection: Probably Okay
Server Info: nginx/1.10.1
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.5.55 - We recommend a minimum MySQL version of 5.6. See: WordPress Requirements
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
gzip: ✔
GD Graphics Library: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Give Configuration

Give Version: 2.0.0
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 Donor Registration✔Donor Register✔Email access
Upgraded From: –
Test Mode: Enabled
Currency Code: GBP
Currency Position: Before
Decimal Separator: .
Thousands Separator: ,
Success Page: http://give18.local/donation-confirmation/
Failure Page: http://give18.local/donation-failed/
Donation History Page: http://give18.local/donation-history/
Give Forms Slug: /donations/
Enabled Payment Gateways: Test Donation, Offline 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

Other Active Plugins

Give - Development Plugin: by Raftaar1191 – 1.0.0

Inactive Plugins

Duplicate Post: by Enrico Battocchi – 3.2.1
Give - 2Checkout Gateway: by WordImpress – 1.0.2
Give - Authorize.net Gateway: by WordImpress – 1.3.2
Give - AWeber: by WordImpress – 1.0.2
Give - Braintree Gateway: by WordImpress – 1.1.1
Give - CCAvenue Gateway: by WordImpress – 1.0
Give - ConvertKit: by WordImpress – 1.0.1
Give - CSV Toolbox: by WordImpress – 1.0
Give - Display Donors: by WordImpress, LLC – 1.0
Give - Dwolla Gateway: by WordImpress – 1.1.2
Give - Email Reports: by WordImpress – 1.0.2
Give - Fee Recovery: by WordImpress – 1.3.8
Give - Form Countdown: by WordImpress – 1.0
Give - Form Field Manager: by WordImpress – 1.2.4
Give - Gift Aid: by WordImpress – 1.0.0
Give - Google Analytics Donation Tracking: by WordImpress – 1.1.1
Give - MailChimp: by WordImpress – 1.3.7
Give - Manual Donations: by WordImpress – 1.2.2
Give - Paymill Gateway: by WordImpress – 1.1
Give - PDF Receipts: by WordImpress – 2.2.2
Give - Recurring Donations: by WordImpress – 1.5.4
Give - Stripe Gateway: by WordImpress – 1.5.2
Give - Tributes: by WordImpress – 1.3.3

Theme

Name: Twenty Sixteen
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>
@DevinWalker
Copy link
Member

Good call @raftaar1191

@DevinWalker DevinWalker added this to the 2.0.1 milestone Jan 17, 2018
@ravinderk ravinderk modified the milestones: 2.0.1, 2.0.2 Jan 22, 2018
raftaar1191 added a commit to raftaar1191/Give that referenced this issue Jan 22, 2018
@raftaar1191
Copy link
Contributor Author

Had a discussion on the do_action parameter with @ravinderk

How we can deprecate the second parameter.

  • First, we need to remove the second parameter used from Give Core as well as from our own add-on

  • Create a blog post and inform all the developer about this ( That we are removing the second parameter from the da_action as this is accessible from the $_POST directly )

  • Released this fix in Give Core Version 2.2 after the blog post is published

@DevinWalker DevinWalker changed the title Deprecating the second parameter Deprecating the second $_POST parameter Jan 22, 2018
raftaar1191 added a commit to raftaar1191/Give that referenced this issue Jan 22, 2018
raftaar1191 added a commit to raftaar1191/Give that referenced this issue Jan 24, 2018
DevinWalker pushed a commit that referenced this issue Jan 25, 2018
Remove variable that is globally accessible #2663
ravinderk added a commit that referenced this issue Jan 29, 2018
Remove Parameter the unwanted parameter #2663
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

3 participants