Give – Donation Plugin and Fundraising Platform - Version 2.5.7

Version Description

Download this release

Release Info

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

Code changes from version 2.5.6 to 2.5.7

give.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
6
  * Author: GiveWP
7
  * Author URI: https://givewp.com/
8
- * Version: 2.5.6
9
  * Text Domain: give
10
  * Domain Path: /languages
11
  *
@@ -439,7 +439,7 @@ if ( ! class_exists( 'Give' ) ) :
439
 
440
  // Plugin version.
441
  if ( ! defined( 'GIVE_VERSION' ) ) {
442
- define( 'GIVE_VERSION', '2.5.6' );
443
  }
444
 
445
  // Plugin Root File.
5
  * Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
6
  * Author: GiveWP
7
  * Author URI: https://givewp.com/
8
+ * Version: 2.5.7
9
  * Text Domain: give
10
  * Domain Path: /languages
11
  *
439
 
440
  // Plugin version.
441
  if ( ! defined( 'GIVE_VERSION' ) ) {
442
+ define( 'GIVE_VERSION', '2.5.7' );
443
  }
444
 
445
  // Plugin Root File.
includes/gateways/stripe/class-give-stripe.php CHANGED
@@ -69,37 +69,47 @@ if ( ! class_exists( 'Give_Stripe' ) ) {
69
  // Bailout, if any of the Stripe gateways are not active.
70
  if ( ! give_stripe_is_any_payment_method_active() ) {
71
 
72
- // If `get_plugin_data` fn not exists then include the file.
73
- if ( ! function_exists( 'get_plugin_data' ) ) {
74
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
75
- }
76
-
77
  // Hardcoded recurring plugin basename to show notice even when recurring addon is deactivated.
78
  $recurring_plugin_basename = 'give-recurring/give-recurring.php';
79
- $recurring_plugin_data = get_plugin_data( WP_CONTENT_DIR . '/plugins/' . $recurring_plugin_basename );
80
-
81
- // Avoid fatal error for smooth update for customers.
82
- if (
83
- isset( $recurring_plugin_data['Version'] ) &&
84
- version_compare( '1.9.3', $recurring_plugin_data['Version'], '>=' )
85
- ) {
86
- add_action( 'admin_notices', function() {
87
-
88
- // Register error notice.
89
- Give()->notices->register_notice(
90
- array(
91
- 'id' => 'give-recurring-fatal-error',
92
- 'type' => 'error',
93
- 'description' => sprintf(__( '<strong>Activation Error:</strong> Please update the Recurring Donations add-on to version <strong>1.9.4+</strong> in order to be compatible with GiveWP <strong>2.5.5+</strong>. If you are experiencing this issue please rollback GiveWP to 2.5.4 or below using the <a href="%s" target="_blank">WP Rollback</a> plugin and <a href="%s" target="_blank">contact support</a> for prompt assistance.', 'give' ), 'https://wordpress.org/plugins/wp-rollback/', 'https://givewp.com/support/'),
94
- 'show' => true,
95
- )
96
- );
97
- });
98
-
99
- // Deactivate recurring addon to avoid fatal error.
100
- deactivate_plugins( $recurring_plugin_basename );
101
- if ( isset( $_GET['activate'] ) ) {
102
- unset( $_GET['activate'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  }
104
  }
105
 
69
  // Bailout, if any of the Stripe gateways are not active.
70
  if ( ! give_stripe_is_any_payment_method_active() ) {
71
 
 
 
 
 
 
72
  // Hardcoded recurring plugin basename to show notice even when recurring addon is deactivated.
73
  $recurring_plugin_basename = 'give-recurring/give-recurring.php';
74
+ $recurring_file_path = WP_CONTENT_DIR . '/plugins/' . $recurring_plugin_basename;
75
+
76
+ // If recurring donations add-on exists.
77
+ if ( file_exists( $recurring_file_path ) ) {
78
+
79
+ // If `get_plugin_data` fn not exists then include the file.
80
+ if ( ! function_exists( 'get_plugin_data' ) ) {
81
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
82
+ }
83
+
84
+ $recurring_plugin_data = get_plugin_data($recurring_file_path);
85
+
86
+ // Avoid fatal error for smooth update for customers.
87
+ if (
88
+ isset( $recurring_plugin_data['Version'] ) &&
89
+ version_compare( '1.9.3', $recurring_plugin_data['Version'], '>=' )
90
+ ) {
91
+ add_action('admin_notices', function() {
92
+
93
+ // Register error notice.
94
+ Give()->notices->register_notice(
95
+ array(
96
+ 'id' => 'give-recurring-fatal-error',
97
+ 'type' => 'error',
98
+ 'description' => sprintf(
99
+ __( '<strong>Activation Error:</strong> Please update the Recurring Donations add-on to version <strong>1.9.4+</strong> in order to be compatible with GiveWP <strong>2.5.5+</strong>. If you are experiencing this issue please rollback GiveWP to 2.5.4 or below using the <a href="%s" target="_blank">WP Rollback</a> plugin and <a href="%s" target="_blank">contact support</a> for prompt assistance.', 'give'),
100
+ 'https://wordpress.org/plugins/wp-rollback/',
101
+ 'https://givewp.com/support/'
102
+ ),
103
+ 'show' => true,
104
+ )
105
+ );
106
+ });
107
+
108
+ // Deactivate recurring addon to avoid fatal error.
109
+ deactivate_plugins( $recurring_plugin_basename );
110
+ if ( isset( $_GET['activate'] ) ) {
111
+ unset( $_GET['activate'] );
112
+ }
113
  }
114
  }
115
 
languages/give.pot CHANGED
@@ -11514,19 +11514,19 @@ msgstr ""
11514
  msgid "Save changes"
11515
  msgstr ""
11516
 
11517
- #: includes/gateways/stripe/class-give-stripe.php:93
11518
  msgid "<strong>Activation Error:</strong> Please update the Recurring Donations add-on to version <strong>1.9.4+</strong> in order to be compatible with GiveWP <strong>2.5.5+</strong>. If you are experiencing this issue please rollback GiveWP to 2.5.4 or below using the <a href=\"%s\" target=\"_blank\">WP Rollback</a> plugin and <a href=\"%s\" target=\"_blank\">contact support</a> for prompt assistance."
11519
  msgstr ""
11520
 
11521
- #: includes/gateways/stripe/class-give-stripe.php:183
11522
  msgid "Stripe - Credit Card"
11523
  msgstr ""
11524
 
11525
- #: includes/gateways/stripe/class-give-stripe.php:184, includes/gateways/stripe/class-give-stripe.php:190
11526
  msgid "Credit Card"
11527
  msgstr ""
11528
 
11529
- #: includes/gateways/stripe/class-give-stripe.php:189
11530
  msgid "Stripe - Checkout"
11531
  msgstr ""
11532
 
11514
  msgid "Save changes"
11515
  msgstr ""
11516
 
11517
+ #: includes/gateways/stripe/class-give-stripe.php:99
11518
  msgid "<strong>Activation Error:</strong> Please update the Recurring Donations add-on to version <strong>1.9.4+</strong> in order to be compatible with GiveWP <strong>2.5.5+</strong>. If you are experiencing this issue please rollback GiveWP to 2.5.4 or below using the <a href=\"%s\" target=\"_blank\">WP Rollback</a> plugin and <a href=\"%s\" target=\"_blank\">contact support</a> for prompt assistance."
11519
  msgstr ""
11520
 
11521
+ #: includes/gateways/stripe/class-give-stripe.php:193
11522
  msgid "Stripe - Credit Card"
11523
  msgstr ""
11524
 
11525
+ #: includes/gateways/stripe/class-give-stripe.php:194, includes/gateways/stripe/class-give-stripe.php:200
11526
  msgid "Credit Card"
11527
  msgstr ""
11528
 
11529
+ #: includes/gateways/stripe/class-give-stripe.php:199
11530
  msgid "Stripe - Checkout"
11531
  msgstr ""
11532
 
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: 5.2
7
  Requires PHP: 5.6
8
- Stable tag: 2.5.6
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -223,6 +223,9 @@ The 2% fee on Stripe donations only applies to donations taken via our free Stri
223
 
224
  == Changelog ==
225
 
 
 
 
226
  = 2.5.6: September 19th, 2019 =
227
  * Notice: Please update the Recurring Donations add-on to version `1.9.4+` in order to use GiveWP 2.5.5+.
228
  * Fix: Resolved a fatal error occuring if using an outdated version of the Recurring Donations add-on. The plugin will now display a message and deactivate the add-on to prevent the error. If you are experiencing this issue please rollback GiveWP to 2.5.4 or below using the [WP Rollback](https://wordpress.org/plugins/wp-rollback/) plugin and [contact support](https://givewp.com/support/) for prompt assistance. [#4255](https://github.com/impress-org/givewp/pull/4255)
5
  Requires at least: 4.8
6
  Tested up to: 5.2
7
  Requires PHP: 5.6
8
+ Stable tag: 2.5.7
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
223
 
224
  == Changelog ==
225
 
226
+ = 2.5.7: September 20th, 2019 =
227
+ * Fix: Resolved issues with the notice added in the previous version displaying incorrectly for sites that do not have Recurring Donations installed or activated. [#4257](https://github.com/impress-org/givewp/pull/4257)
228
+
229
  = 2.5.6: September 19th, 2019 =
230
  * Notice: Please update the Recurring Donations add-on to version `1.9.4+` in order to use GiveWP 2.5.5+.
231
  * Fix: Resolved a fatal error occuring if using an outdated version of the Recurring Donations add-on. The plugin will now display a message and deactivate the add-on to prevent the error. If you are experiencing this issue please rollback GiveWP to 2.5.4 or below using the [WP Rollback](https://wordpress.org/plugins/wp-rollback/) plugin and [contact support](https://givewp.com/support/) for prompt assistance. [#4255](https://github.com/impress-org/givewp/pull/4255)
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitd2d64c4b9688e3bc920e70881738b09a::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit61f7dc731ce8523d797f4ea06cd94b6b::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitd2d64c4b9688e3bc920e70881738b09a
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitd2d64c4b9688e3bc920e70881738b09a
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitd2d64c4b9688e3bc920e70881738b09a', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitd2d64c4b9688e3bc920e70881738b09a', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInitd2d64c4b9688e3bc920e70881738b09a::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit61f7dc731ce8523d797f4ea06cd94b6b
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit61f7dc731ce8523d797f4ea06cd94b6b', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit61f7dc731ce8523d797f4ea06cd94b6b', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit61f7dc731ce8523d797f4ea06cd94b6b::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitd2d64c4b9688e3bc920e70881738b09a
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'S' =>
@@ -48,9 +48,9 @@ class ComposerStaticInitd2d64c4b9688e3bc920e70881738b09a
48
  public static function getInitializer(ClassLoader $loader)
49
  {
50
  return \Closure::bind(function () use ($loader) {
51
- $loader->prefixLengthsPsr4 = ComposerStaticInitd2d64c4b9688e3bc920e70881738b09a::$prefixLengthsPsr4;
52
- $loader->prefixDirsPsr4 = ComposerStaticInitd2d64c4b9688e3bc920e70881738b09a::$prefixDirsPsr4;
53
- $loader->classMap = ComposerStaticInitd2d64c4b9688e3bc920e70881738b09a::$classMap;
54
 
55
  }, null, ClassLoader::class);
56
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit61f7dc731ce8523d797f4ea06cd94b6b
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'S' =>
48
  public static function getInitializer(ClassLoader $loader)
49
  {
50
  return \Closure::bind(function () use ($loader) {
51
+ $loader->prefixLengthsPsr4 = ComposerStaticInit61f7dc731ce8523d797f4ea06cd94b6b::$prefixLengthsPsr4;
52
+ $loader->prefixDirsPsr4 = ComposerStaticInit61f7dc731ce8523d797f4ea06cd94b6b::$prefixDirsPsr4;
53
+ $loader->classMap = ComposerStaticInit61f7dc731ce8523d797f4ea06cd94b6b::$classMap;
54
 
55
  }, null, ClassLoader::class);
56
  }