Give – Donation Plugin and Fundraising Platform - Version 2.1.6

Version Description

Give version 1.8 is a major update. Please make sure you make a backup of your database before updating.

Download this release

Release Info

Developer dlocc
Plugin Icon 128x128 Give – Donation Plugin and Fundraising Platform
Version 2.1.6
Comparing to
See all releases

Code changes from version 2.1.5 to 2.1.6

give.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
6
  * Author: WordImpress
7
  * Author URI: https://wordimpress.com
8
- * Version: 2.1.5
9
  * Text Domain: give
10
  * Domain Path: /languages
11
  * GitHub Plugin URI: https://github.com/WordImpress/Give
@@ -395,7 +395,7 @@ if ( ! class_exists( 'Give' ) ) :
395
 
396
  // Plugin version
397
  if ( ! defined( 'GIVE_VERSION' ) ) {
398
- define( 'GIVE_VERSION', '2.1.5' );
399
  }
400
 
401
  // Plugin Root File
5
  * Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
6
  * Author: WordImpress
7
  * Author URI: https://wordimpress.com
8
+ * Version: 2.1.6
9
  * Text Domain: give
10
  * Domain Path: /languages
11
  * GitHub Plugin URI: https://github.com/WordImpress/Give
395
 
396
  // Plugin version
397
  if ( ! defined( 'GIVE_VERSION' ) ) {
398
+ define( 'GIVE_VERSION', '2.1.6' );
399
  }
400
 
401
  // Plugin Root File
includes/admin/tools/export/give-export-donations-exporter.php CHANGED
@@ -170,25 +170,25 @@ class Give_Export_Donations_CSV extends Give_Batch_Export {
170
  foreach ( $columns as $key => $value ) {
171
 
172
  switch ( $key ) {
173
- case 'donation_id' :
174
  $cols['donation_id'] = __( 'Donation ID', 'give' );
175
  break;
176
- case 'seq_id' :
177
  $cols['seq_id'] = __( 'Donation Number', 'give' );
178
  break;
179
- case 'first_name' :
180
  $cols['first_name'] = __( 'First Name', 'give' );
181
  break;
182
- case 'last_name' :
183
  $cols['last_name'] = __( 'Last Name', 'give' );
184
  break;
185
- case 'email' :
186
  $cols['email'] = __( 'Email Address', 'give' );
187
  break;
188
- case 'company' :
189
  $cols['company'] = __( 'Company Name', 'give' );
190
  break;
191
- case 'address' :
192
  $cols['address_line1'] = __( 'Address 1', 'give' );
193
  $cols['address_line2'] = __( 'Address 2', 'give' );
194
  $cols['address_city'] = __( 'City', 'give' );
@@ -196,46 +196,46 @@ class Give_Export_Donations_CSV extends Give_Batch_Export {
196
  $cols['address_zip'] = __( 'Zip', 'give' );
197
  $cols['address_country'] = __( 'Country', 'give' );
198
  break;
199
- case 'donation_total' :
200
  $cols['donation_total'] = __( 'Donation Total', 'give' );
201
  break;
202
- case 'currency_code' :
203
  $cols['currency_code'] = __( 'Currency Code', 'give' );
204
  break;
205
- case 'currency_symbol' :
206
  $cols['currency_symbol'] = __( 'Currency Symbol', 'give' );
207
  break;
208
- case 'donation_status' :
209
  $cols['donation_status'] = __( 'Donation Status', 'give' );
210
  break;
211
- case 'payment_gateway' :
212
  $cols['payment_gateway'] = __( 'Payment Gateway', 'give' );
213
  break;
214
- case 'form_id' :
215
  $cols['form_id'] = __( 'Form ID', 'give' );
216
  break;
217
- case 'form_title' :
218
  $cols['form_title'] = __( 'Form Title', 'give' );
219
  break;
220
- case 'form_level_id' :
221
  $cols['form_level_id'] = __( 'Level ID', 'give' );
222
  break;
223
- case 'form_level_title' :
224
  $cols['form_level_title'] = __( 'Level Title', 'give' );
225
  break;
226
- case 'donation_date' :
227
  $cols['donation_date'] = __( 'Donation Date', 'give' );
228
  break;
229
- case 'donation_time' :
230
  $cols['donation_time'] = __( 'Donation Time', 'give' );
231
  break;
232
- case 'userid' :
233
  $cols['userid'] = __( 'User ID', 'give' );
234
  break;
235
- case 'donorid' :
236
  $cols['donorid'] = __( 'Donor ID', 'give' );
237
  break;
238
- case 'donor_ip' :
239
  $cols['donor_ip'] = __( 'Donor IP Address', 'give' );
240
  break;
241
  default:
@@ -363,8 +363,8 @@ class Give_Export_Donations_CSV extends Give_Batch_Export {
363
  }
364
 
365
  if ( ! empty( $columns['currency_symbol'] ) ) {
366
- $currency_code = $data[ $i ]['currency_code'];
367
- $data[ $i ]['currency_symbol'] = give_currency_symbol( $currency_code, true );
368
  }
369
 
370
  if ( ! empty( $columns['donation_status'] ) ) {
@@ -392,13 +392,16 @@ class Give_Export_Donations_CSV extends Give_Batch_Export {
392
  if ( empty( $var_prices ) ) {
393
  $data[ $i ]['form_level_title'] = '';
394
  } else {
395
- $prices_atts = '';
396
- if ( $variable_prices = give_get_variable_prices( $payment->form_id ) ) {
397
- foreach ( $variable_prices as $variable_price ) {
398
- $prices_atts[ $variable_price['_give_id']['level_id'] ] = give_format_amount( $variable_price['_give_amount'] );
 
399
  }
 
 
 
400
  }
401
- $data[ $i ]['form_level_title'] = give_get_price_option_name( $payment->form_id, $payment->price_id );
402
  }
403
  }
404
 
@@ -568,4 +571,4 @@ class Give_Export_Donations_CSV extends Give_Batch_Export {
568
 
569
  return false;
570
  }
571
- }
170
  foreach ( $columns as $key => $value ) {
171
 
172
  switch ( $key ) {
173
+ case 'donation_id':
174
  $cols['donation_id'] = __( 'Donation ID', 'give' );
175
  break;
176
+ case 'seq_id':
177
  $cols['seq_id'] = __( 'Donation Number', 'give' );
178
  break;
179
+ case 'first_name':
180
  $cols['first_name'] = __( 'First Name', 'give' );
181
  break;
182
+ case 'last_name':
183
  $cols['last_name'] = __( 'Last Name', 'give' );
184
  break;
185
+ case 'email':
186
  $cols['email'] = __( 'Email Address', 'give' );
187
  break;
188
+ case 'company':
189
  $cols['company'] = __( 'Company Name', 'give' );
190
  break;
191
+ case 'address':
192
  $cols['address_line1'] = __( 'Address 1', 'give' );
193
  $cols['address_line2'] = __( 'Address 2', 'give' );
194
  $cols['address_city'] = __( 'City', 'give' );
196
  $cols['address_zip'] = __( 'Zip', 'give' );
197
  $cols['address_country'] = __( 'Country', 'give' );
198
  break;
199
+ case 'donation_total':
200
  $cols['donation_total'] = __( 'Donation Total', 'give' );
201
  break;
202
+ case 'currency_code':
203
  $cols['currency_code'] = __( 'Currency Code', 'give' );
204
  break;
205
+ case 'currency_symbol':
206
  $cols['currency_symbol'] = __( 'Currency Symbol', 'give' );
207
  break;
208
+ case 'donation_status':
209
  $cols['donation_status'] = __( 'Donation Status', 'give' );
210
  break;
211
+ case 'payment_gateway':
212
  $cols['payment_gateway'] = __( 'Payment Gateway', 'give' );
213
  break;
214
+ case 'form_id':
215
  $cols['form_id'] = __( 'Form ID', 'give' );
216
  break;
217
+ case 'form_title':
218
  $cols['form_title'] = __( 'Form Title', 'give' );
219
  break;
220
+ case 'form_level_id':
221
  $cols['form_level_id'] = __( 'Level ID', 'give' );
222
  break;
223
+ case 'form_level_title':
224
  $cols['form_level_title'] = __( 'Level Title', 'give' );
225
  break;
226
+ case 'donation_date':
227
  $cols['donation_date'] = __( 'Donation Date', 'give' );
228
  break;
229
+ case 'donation_time':
230
  $cols['donation_time'] = __( 'Donation Time', 'give' );
231
  break;
232
+ case 'userid':
233
  $cols['userid'] = __( 'User ID', 'give' );
234
  break;
235
+ case 'donorid':
236
  $cols['donorid'] = __( 'Donor ID', 'give' );
237
  break;
238
+ case 'donor_ip':
239
  $cols['donor_ip'] = __( 'Donor IP Address', 'give' );
240
  break;
241
  default:
363
  }
364
 
365
  if ( ! empty( $columns['currency_symbol'] ) ) {
366
+ $currency_code = $data[ $i ]['currency_code'];
367
+ $data[ $i ]['currency_symbol'] = give_currency_symbol( $currency_code, true );
368
  }
369
 
370
  if ( ! empty( $columns['donation_status'] ) ) {
392
  if ( empty( $var_prices ) ) {
393
  $data[ $i ]['form_level_title'] = '';
394
  } else {
395
+ if ( 'custom' === $payment->price_id ) {
396
+ $custom_amount_text = give_get_meta( $payment->form_id, '_give_custom_amount_text', true );
397
+
398
+ if ( empty( $custom_amount_text ) ) {
399
+ $custom_amount_text = esc_html__( 'Custom', 'give' );
400
  }
401
+ $data[ $i ]['form_level_title'] = $custom_amount_text;
402
+ } else {
403
+ $data[ $i ]['form_level_title'] = give_get_price_option_name( $payment->form_id, $payment->price_id );
404
  }
 
405
  }
406
  }
407
 
571
 
572
  return false;
573
  }
574
+ }
includes/admin/upgrades/views/upgrades.php CHANGED
@@ -41,16 +41,27 @@ $give_updates = Give_Updates::get_instance();
41
  <div class="panel-content">
42
  <p class="give-update-button">
43
  <span class="give-doing-update-text-p" <?php echo Give_Updates::$background_updater->is_paused_process() ? 'style="display:none;"' : ''; ?>>
44
- <?php echo sprintf(
45
- __( '%1$s <a href="%2$s" class="give-update-now %3$s">%4$s</a>', 'give' ),
46
- $is_doing_updates ?
47
- __( 'Give is currently updating the database in the background.', 'give' ) :
48
- __( 'Give needs to update the database.', 'give' ),
49
- $db_update_url,
50
- ( $is_doing_updates ? 'give-hidden' : '' ),
51
- __( 'Update now', 'give' )
52
- );
53
- ?>
 
 
 
 
 
 
 
 
 
 
 
54
  </span>
55
  <span class="give-update-paused-text-p" <?php echo ! Give_Updates::$background_updater->is_paused_process() ? 'style="display:none;"' : ''; ?>>
56
  <?php if ( get_option( 'give_upgrade_error' ) ) : ?>
41
  <div class="panel-content">
42
  <p class="give-update-button">
43
  <span class="give-doing-update-text-p" <?php echo Give_Updates::$background_updater->is_paused_process() ? 'style="display:none;"' : ''; ?>>
44
+ <?php
45
+ if ( ! give_test_ajax_works() ) {
46
+ echo sprintf(
47
+ '%1$s <a href="%2$s" target="_blank">%3$s</a>',
48
+ __( 'Give needs to upgrade the database but cannot because AJAX does not appear accessible. This could be because your website is password protected, in maintenance mode, or has a specific hosting configuration or plugin active that is preventing access.', 'give' ),
49
+ esc_url( 'http://docs.givewp.com/troubleshooting-db-updates' ),
50
+ __( 'Read More', 'give' ) . ' &raquo;'
51
+ );
52
+
53
+ } else {
54
+ echo sprintf(
55
+ __( '%1$s <a href="%2$s" class="give-update-now %3$s">%4$s</a>', 'give' ),
56
+ $is_doing_updates ?
57
+ __( 'Give is currently updating the database in the background.', 'give' ) :
58
+ __( 'Give needs to update the database.', 'give' ),
59
+ $db_update_url,
60
+ ( $is_doing_updates ? 'give-hidden' : '' ),
61
+ __( 'Update now', 'give' )
62
+ );
63
+ }
64
+ ?>
65
  </span>
66
  <span class="give-update-paused-text-p" <?php echo ! Give_Updates::$background_updater->is_paused_process() ? 'style="display:none;"' : ''; ?>>
67
  <?php if ( get_option( 'give_upgrade_error' ) ) : ?>
includes/install.php CHANGED
@@ -147,7 +147,8 @@ function give_run_install() {
147
  'v201_move_metadata_into_new_table',
148
  'v201_logs_upgrades',
149
  'v210_verify_form_status_upgrades',
150
- 'v213_delete_donation_meta'
 
151
  );
152
 
153
  foreach ( $upgrade_routines as $upgrade ) {
147
  'v201_move_metadata_into_new_table',
148
  'v201_logs_upgrades',
149
  'v210_verify_form_status_upgrades',
150
+ 'v213_delete_donation_meta',
151
+ 'v215_update_donor_user_roles'
152
  );
153
 
154
  foreach ( $upgrade_routines as $upgrade ) {
languages/give.pot CHANGED
@@ -5295,23 +5295,23 @@ msgstr ""
5295
  msgid "This donation was imported by %s"
5296
  msgstr ""
5297
 
5298
- #: includes/install.php:350, includes/forms/template.php:1548, includes/forms/template.php:1553, includes/admin/forms/class-metabox-form-data.php:535, includes/admin/settings/class-settings-display.php:278, tests/unit-tests/tests-install.php:100
5299
  msgid "Agree to Terms?"
5300
  msgstr ""
5301
 
5302
- #: includes/install.php:425
5303
  msgid "Donation Confirmation"
5304
  msgstr ""
5305
 
5306
- #: includes/install.php:444
5307
  msgid "Donation Failed"
5308
  msgstr ""
5309
 
5310
- #: includes/install.php:445
5311
  msgid "We're sorry, your donation failed to process. Please try again or contact site support."
5312
  msgstr ""
5313
 
5314
- #: includes/install.php:461, includes/admin/shortcodes/shortcode-give-donation-history.php:24
5315
  msgid "Donation History"
5316
  msgstr ""
5317
 
@@ -9366,7 +9366,7 @@ msgstr ""
9366
  msgid "Average monthly donations:"
9367
  msgstr ""
9368
 
9369
- #: includes/admin/reports/graphing.php:498
9370
  msgid "Custom"
9371
  msgstr ""
9372
 
@@ -10145,15 +10145,15 @@ msgstr ""
10145
  msgid "Restart the updater"
10146
  msgstr ""
10147
 
10148
- #: includes/admin/upgrades/class-give-updates.php:620, includes/admin/upgrades/class-give-updates.php:817, includes/admin/upgrades/views/upgrades.php:57
10149
  msgid "An unexpected issue occurred during the database update which caused it to stop automatically. Please contact support for assistance."
10150
  msgstr ""
10151
 
10152
- #: includes/admin/upgrades/class-give-updates.php:621, includes/admin/upgrades/class-give-updates.php:649
10153
  msgid "Read More"
10154
  msgstr ""
10155
 
10156
- #: includes/admin/upgrades/class-give-updates.php:647
10157
  msgid "Give needs to upgrade the database but cannot because AJAX does not appear accessible. This could be because your website is password protected, in maintenance mode, or has a specific hosting configuration or plugin active that is preventing access."
10158
  msgstr ""
10159
 
@@ -10169,7 +10169,7 @@ msgstr ""
10169
  msgid "Run the updater"
10170
  msgstr ""
10171
 
10172
- #: includes/admin/upgrades/class-give-updates.php:811, includes/admin/upgrades/views/upgrades.php:59
10173
  msgid "The updates have been paused."
10174
  msgstr ""
10175
 
@@ -11784,39 +11784,39 @@ msgstr ""
11784
  msgid "Give regularly receives new features, bug fixes, and enhancements. It is important to always stay up-to-date with latest version of Give core and its add-ons. Please create a backup of your site before updating. To update add-ons be sure your <a href=\"%1$s\">license keys</a> are activated."
11785
  msgstr ""
11786
 
11787
- #: includes/admin/upgrades/views/upgrades.php:45
11788
  msgid "%1$s <a href=\"%2$s\" class=\"give-update-now %3$s\">%4$s</a>"
11789
  msgstr ""
11790
 
11791
- #: includes/admin/upgrades/views/upgrades.php:47
11792
  msgid "Give is currently updating the database in the background."
11793
  msgstr ""
11794
 
11795
- #: includes/admin/upgrades/views/upgrades.php:48
11796
  msgid "Give needs to update the database."
11797
  msgstr ""
11798
 
11799
- #: includes/admin/upgrades/views/upgrades.php:51
11800
  msgid "Update now"
11801
  msgstr ""
11802
 
11803
- #: includes/admin/upgrades/views/upgrades.php:66
11804
  msgid "Restart Upgrades"
11805
  msgstr ""
11806
 
11807
- #: includes/admin/upgrades/views/upgrades.php:70
11808
  msgid "Pause Upgrades"
11809
  msgstr ""
11810
 
11811
- #: includes/admin/upgrades/views/upgrades.php:80
11812
  msgid "Update %s of %s"
11813
  msgstr ""
11814
 
11815
- #: includes/admin/upgrades/views/upgrades.php:122
11816
  msgid "Add-on Updates"
11817
  msgstr ""
11818
 
11819
- #: includes/admin/upgrades/views/upgrades.php:128
11820
  msgid "There is %1$d Give addon that needs to be updated. <a href=\"%2$s\">Update now</a>"
11821
  msgid_plural "There are %1$d Give addons that need to be updated. <a href=\"%2$s\">Update now</a>"
11822
  msgstr[0] ""
5295
  msgid "This donation was imported by %s"
5296
  msgstr ""
5297
 
5298
+ #: includes/install.php:351, includes/forms/template.php:1548, includes/forms/template.php:1553, includes/admin/forms/class-metabox-form-data.php:535, includes/admin/settings/class-settings-display.php:278, tests/unit-tests/tests-install.php:100
5299
  msgid "Agree to Terms?"
5300
  msgstr ""
5301
 
5302
+ #: includes/install.php:426
5303
  msgid "Donation Confirmation"
5304
  msgstr ""
5305
 
5306
+ #: includes/install.php:445
5307
  msgid "Donation Failed"
5308
  msgstr ""
5309
 
5310
+ #: includes/install.php:446
5311
  msgid "We're sorry, your donation failed to process. Please try again or contact site support."
5312
  msgstr ""
5313
 
5314
+ #: includes/install.php:462, includes/admin/shortcodes/shortcode-give-donation-history.php:24
5315
  msgid "Donation History"
5316
  msgstr ""
5317
 
9366
  msgid "Average monthly donations:"
9367
  msgstr ""
9368
 
9369
+ #: includes/admin/reports/graphing.php:498, includes/admin/tools/export/give-export-donations-exporter.php:399
9370
  msgid "Custom"
9371
  msgstr ""
9372
 
10145
  msgid "Restart the updater"
10146
  msgstr ""
10147
 
10148
+ #: includes/admin/upgrades/class-give-updates.php:620, includes/admin/upgrades/class-give-updates.php:817, includes/admin/upgrades/views/upgrades.php:68
10149
  msgid "An unexpected issue occurred during the database update which caused it to stop automatically. Please contact support for assistance."
10150
  msgstr ""
10151
 
10152
+ #: includes/admin/upgrades/class-give-updates.php:621, includes/admin/upgrades/class-give-updates.php:649, includes/admin/upgrades/views/upgrades.php:50
10153
  msgid "Read More"
10154
  msgstr ""
10155
 
10156
+ #: includes/admin/upgrades/class-give-updates.php:647, includes/admin/upgrades/views/upgrades.php:48
10157
  msgid "Give needs to upgrade the database but cannot because AJAX does not appear accessible. This could be because your website is password protected, in maintenance mode, or has a specific hosting configuration or plugin active that is preventing access."
10158
  msgstr ""
10159
 
10169
  msgid "Run the updater"
10170
  msgstr ""
10171
 
10172
+ #: includes/admin/upgrades/class-give-updates.php:811, includes/admin/upgrades/views/upgrades.php:70
10173
  msgid "The updates have been paused."
10174
  msgstr ""
10175
 
11784
  msgid "Give regularly receives new features, bug fixes, and enhancements. It is important to always stay up-to-date with latest version of Give core and its add-ons. Please create a backup of your site before updating. To update add-ons be sure your <a href=\"%1$s\">license keys</a> are activated."
11785
  msgstr ""
11786
 
11787
+ #: includes/admin/upgrades/views/upgrades.php:55
11788
  msgid "%1$s <a href=\"%2$s\" class=\"give-update-now %3$s\">%4$s</a>"
11789
  msgstr ""
11790
 
11791
+ #: includes/admin/upgrades/views/upgrades.php:57
11792
  msgid "Give is currently updating the database in the background."
11793
  msgstr ""
11794
 
11795
+ #: includes/admin/upgrades/views/upgrades.php:58
11796
  msgid "Give needs to update the database."
11797
  msgstr ""
11798
 
11799
+ #: includes/admin/upgrades/views/upgrades.php:61
11800
  msgid "Update now"
11801
  msgstr ""
11802
 
11803
+ #: includes/admin/upgrades/views/upgrades.php:77
11804
  msgid "Restart Upgrades"
11805
  msgstr ""
11806
 
11807
+ #: includes/admin/upgrades/views/upgrades.php:81
11808
  msgid "Pause Upgrades"
11809
  msgstr ""
11810
 
11811
+ #: includes/admin/upgrades/views/upgrades.php:91
11812
  msgid "Update %s of %s"
11813
  msgstr ""
11814
 
11815
+ #: includes/admin/upgrades/views/upgrades.php:133
11816
  msgid "Add-on Updates"
11817
  msgstr ""
11818
 
11819
+ #: includes/admin/upgrades/views/upgrades.php:139
11820
  msgid "There is %1$d Give addon that needs to be updated. <a href=\"%2$s\">Update now</a>"
11821
  msgid_plural "There are %1$d Give addons that need to be updated. <a href=\"%2$s\">Update now</a>"
11822
  msgstr[0] ""
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: donation, donations, donation plugin, wordpress donation plugin, givewp, g
5
  Requires at least: 4.8
6
  Tested up to: 4.9
7
  Requires PHP: 5.3
8
- Stable tag: 2.1.5
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -208,6 +208,11 @@ Use Give for donations, and let WooCommerce or WP eCommerce or the like handle y
208
 
209
  == Changelog ==
210
 
 
 
 
 
 
211
  = 2.1.5: June 18th, 2018 =
212
  * New: Added a "Give" filter for the plugin menu section on WP multisites. [#3355](https://github.com/wordimpress/give/issues/3355)
213
  * New: Added shortcode support to the "Offline Donations Instructions" output. This will allow you to include any type of shortcode output within the content to improve your content. [#2937](https://github.com/wordimpress/give/issues/2937)
5
  Requires at least: 4.8
6
  Tested up to: 4.9
7
  Requires PHP: 5.3
8
+ Stable tag: 2.1.6
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
208
 
209
  == Changelog ==
210
 
211
+ = 2.1.6: June 20th, 2018 =
212
+ * Fix: DB Update incorrectly appears on fresh installs. [#3390](https://github.com/wordimpress/give/issues/3390)
213
+ * Fix: Ensure the level title in the exported CSV reads custom on custom donations. [#3380](https://github.com/wordimpress/give/issues/3380)
214
+ * Fix: Don't allow db updates to display if AJAX is inaccessible. [#3393](https://github.com/WordImpress/Give/issues/3393)
215
+
216
  = 2.1.5: June 18th, 2018 =
217
  * New: Added a "Give" filter for the plugin menu section on WP multisites. [#3355](https://github.com/wordimpress/give/issues/3355)
218
  * New: Added shortcode support to the "Offline Donations Instructions" output. This will allow you to include any type of shortcode output within the content to improve your content. [#2937](https://github.com/wordimpress/give/issues/2937)