Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Commit

Permalink
Fix auto updater bug
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDorier committed May 14, 2018
1 parent 918fff0 commit 748fd3f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## 2.2.24
### Fixed
- Bug: In some circumstances the auto update might crash the wordpress dashboard

## 2.2.23
### Fixed
- Setting `Keep store level settings` to `transaction speed` would still override store's setting
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "woocommerce-plugin",
"license": "MIT",
"description": "BTCPay payment gateway for WooCommerce",
"version": "2.2.23",
"version": "2.2.24",

"repository": {
"type": "git",
Expand Down
16 changes: 7 additions & 9 deletions src/class-wc-gateway-bitpay.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
/*
Plugin Name: BTCPay for WooCommerce
Plugin URI: https://github.com/btcpayserver/woocommerce-plugin/releases/tag/v2.2.23
Plugin URI: https://github.com/btcpayserver/woocommerce-plugin/releases/tag/v2.2.24
Description: Enable your WooCommerce store to accept Bitcoin with BTCPay.
Author: BTCPay
Text Domain: BTCPay
Author URI: https://github.com/btcpayserver
Version: 2.2.23
Version: 2.2.24
License: Copyright 2011-2014 BTCPay, MIT License
License URI: https://github.com/btcpayserver/woocommerce-plugin/blob/master/LICENSE
GitHub Plugin URI: https://github.com/btcpayserver/woocommerce-plugin
Expand All @@ -19,7 +19,7 @@
exit;
}

define("BTCPAY_VERSION", "2.2.23");
define("BTCPAY_VERSION", "2.2.24");
$autoloader_param = __DIR__ . '/lib/Bitpay/Autoloader.php';

// Load up the BitPay library
Expand Down Expand Up @@ -1224,14 +1224,12 @@ function display_transient_update_plugins ($transient)
{
$obj->url = 'https://github.com/btcpayserver/woocommerce-plugin/releases/tag/v'.$response['version'];
$obj->package = 'https://github.com/btcpayserver/woocommerce-plugin/releases/download/v'.$response['version'].'/btcpay-for-woocommerce.zip';
if(isset($transient->response))
{
$transient->response['btcpay-for-woocommerce/class-wc-gateway-bitpay.php'] = $obj;
}
else

if(!isset( $transient->response ) || !is_array( $transient->response ))
{
$transient['btcpay-for-woocommerce/class-wc-gateway-bitpay.php'] = $obj;
$transient->response = array();
}
$transient->response['btcpay-for-woocommerce/class-wc-gateway-bitpay.php'] = $obj;
}
}
catch (\Exception $e)
Expand Down

0 comments on commit 748fd3f

Please sign in to comment.