Plugin Directory

Changeset 1371732


Ignore:
Timestamp:
03/15/2016 05:37:05 PM (10 years ago)
Author:
naomicbush
Message:

Fix issue with upgrader check preventing other plugins from installing

Location:
gravity-forms-stripe/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gravity-forms-stripe/trunk/gravity-forms-stripe.php

    r1368950 r1371732  
    55 * Plugin URI: https://gravityplus.pro/gravity-forms-stripe
    66 * Description: Use Stripe to process credit card payments on your site, easily and securely, with Gravity Forms
    7  * Version: 1.9.2.6
     7 * Version: 1.9.2.7
    88 * Author: gravity+
    99 * Author URI: https://gravityplus.pro
     
    2828 *
    2929 * @package   GFP_Stripe
    30  * @version   1.9.2.6
     30 * @version   1.9.2.7
    3131 * @author    gravity+ <support@gravityplus.pro>
    3232 * @license   GPL-2.0+
     
    3434 * @copyright 2012-2016 gravity+
    3535 *
    36  * last updated: March 11, 2016
     36 * last updated: March 15, 2016
    3737 */
    3838
  • gravity-forms-stripe/trunk/includes/class-gfp-stripe.php

    r1368950 r1371732  
    4545     * @var string
    4646     */
    47     private static $version = '1.9.2.6';
     47    private static $version = '1.9.2.7';
    4848
    4949    /**
     
    126126        add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
    127127
    128         add_filter( 'upgrader_pre_install', array( $this, 'deactivate_plugin_before_upgrade' ), 10, 2 );
     128        add_filter( 'upgrader_post_install', array( $this, 'upgrader_post_install' ), 10, 2 );
    129129
    130130    }
     
    229229     * If More Stripe is installed, deactivate it when we upgrade +Stripe
    230230     *
    231      * Taken from Plugin_Upgrader::deactivate_plugin_before_upgrade
    232      *
    233      * @since 1.9.2.6
     231     * @since 1.9.2.7
    234232     *
    235233     * @param $return
    236234     * @param $plugin
    237235     *
    238      * @return WP_Error
    239      */
    240     public function deactivate_plugin_before_upgrade( $return, $plugin ) {
    241 
    242         if ( is_wp_error( $return ) ) {
    243 
    244             return $return;
    245 
    246         }
    247 
    248         // When in cron (background updates) don't deactivate the plugin, as we require a browser to reactivate it
    249         if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
    250             return $return;
    251         }
    252 
    253         $plugin = isset( $plugin[ 'plugin' ] ) ? $plugin[ 'plugin' ] : '';
    254 
    255         if ( empty( $plugin ) ) {
    256 
    257             return new WP_Error( 'bad_request', __( 'Invalid Data provided.' ) );
    258 
    259         }
    260 
    261         if ( 'gravity-forms-stripe/gravity-forms-stripe.php' == $plugin ) {
    262 
    263             $more_stripe_options = array(
    264                 'gravityforms-stripe-more/more-stripe.php',
    265                 'gravityforms-stripe-more/gravityforms-stripe-more.php'
    266             );
    267 
    268             foreach ( $more_stripe_options as $more_stripe ) {
    269 
    270                 if ( is_plugin_active( $more_stripe ) ) {
    271 
    272                     deactivate_plugins( $more_stripe );
    273 
    274                     break;
     236     * @return bool
     237     */
     238    public function upgrader_post_install( $return, $plugin ) {
     239
     240        if ( $return ) {
     241
     242                $plugin = isset( $plugin[ 'plugin' ] ) ? $plugin[ 'plugin' ] : '';
     243
     244                if ( 'gravity-forms-stripe/gravity-forms-stripe.php' == $plugin ) {
     245
     246                    $more_stripe_options = array(
     247                        'gravityforms-stripe-more/more-stripe.php',
     248                        'gravityforms-stripe-more/gravityforms-stripe-more.php'
     249                    );
     250
     251                    foreach ( $more_stripe_options as $more_stripe ) {
     252
     253                        if ( is_plugin_active( $more_stripe ) ) {
     254
     255                            deactivate_plugins( $more_stripe );
     256
     257                            break;
     258
     259                        }
     260
     261                    }
     262
     263                    delete_transient( 'gfp_stripe_currency' );
    275264
    276265                }
    277266
    278267            }
    279 
    280             delete_transient( 'gfp_stripe_currency' );
    281 
    282         }
    283268
    284269        return $return;
  • gravity-forms-stripe/trunk/readme.txt

    r1368989 r1371732  
    55Requires at least: 3.9
    66Tested up to: 4.5
    7 Stable tag: 1.9.2.6
     7Stable tag: 1.9.2.7
    88
    99Build your own completely custom credit card payment forms with Stripe & Gravity Forms!
     
    164164
    165165== Changelog ==
     166
     167= 1.9.2.7 (March 2016) =
     168
     169**DO NOT UPDATE if you also use More Stripe and don't have version 1.9 or greater (email support for latest version).**
     170
     171* **Miscellaneous**
     172
     173    * Fix issue with upgrader check preventing other plugins from installing
    166174
    167175= 1.9.2.6 (March 2016) =
     
    641649
    642650== Upgrade Notice ==
     651= 1.9.2.7 =
     652DO NOT UPDATE if you are using More Stripe and don't have version 1.9 or greater (email support for latest version). Fix issue with upgrader check preventing other plugins from installing.
     653
    643654= 1.9.2.6 =
    644655DO NOT UPDATE if you are using More Stripe and don't have version 1.9 or greater (email support for latest version). Fix fatal error when activated with an incompatible version of More Stripe. Also fix currency error on Forms->Settings page.
Note: See TracChangeset for help on using the changeset viewer.