Skip to content

Commit

Permalink
v1.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
tuhin18003 committed Feb 9, 2019
1 parent cc3e254 commit 73ebe0d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/actions/CustomAjax.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php namespace WooGateWayCoreLib\actions;
<?php namespace WooGateWayCoreLib\Actions;

/**
* Class: Custom ajax call
Expand Down
16 changes: 14 additions & 2 deletions core/install/Activate.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static function on_activate(){
"CREATE TABLE IF NOT EXISTS `{$wapg_tables['addresses']}`(
`id` int(11) NOT NULL auto_increment,
`coin_id` int(11),
`address` varchar(56),
`address` varchar(1024),
`lock_status` char(1),
PRIMARY KEY ( `id`)
) $charset_collate",
Expand Down Expand Up @@ -103,12 +103,24 @@ public static function on_activate(){
* @global type $wapg_current_db_versioncheck db status
*/
public static function check_db_status(){
global $wapg_current_db_version;
global $wapg_current_db_version, $wpdb, $wapg_tables;
$get_installed_db_version = get_site_option( 'wapg_db_version' );
if( empty( $get_installed_db_version ) ){
self::on_activate();
}elseif( $get_installed_db_version != $wapg_current_db_version){
//update db
$update_sqls = array(
"ALTER TABLE `{$wapg_tables['addresses']}` CHANGE address address varchar(1024)"
);
foreach ( $update_sqls as $sql ) {
if ( $wpdb->query( $sql ) === false ){
continue;
}
}

//add db version to db
add_option( 'wapg_db_version', CS_WAPG_DB_VERSION );

}
}

Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Text Domain: woo-altcoin-payment-gateway
Domain Path: /languages
Requires at least: 4.0
Tested up to: 5.0.3
Stable tag: 1.1.6
Stable tag: 1.1.7
Requires PHP: 6.0
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl.txt
Expand Down Expand Up @@ -132,6 +132,9 @@ English , Spanish , French, Dutch

== Changelog ==

= 1.1.7 =
* Database updated

= 1.1.6 =
* Minor bug fixed

Expand Down
6 changes: 3 additions & 3 deletions woocommerce-altcoin-payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: WooCommerce AltCoin Payment Gateway
* Plugin URI: https://wordpresspremiumplugins.com/download/woocommerce-altcoin-payment-gateway/
* Description: Woocommerce payment gateway to accept crypto currency in your store.
* Version: 1.1.6
* Version: 1.1.7
* Author: CodeSolz
* Author URI: https://www.codesolz.net
* License: GPLv3
Expand Down Expand Up @@ -39,14 +39,14 @@ class Woocommerce_Altcoin_Payment_Gateway {
*
* @var String
*/
private static $version = '1.1.6';
private static $version = '1.1.7';

/**
* Hold version
*
* @var String
*/
private static $db_version = '1.0.0';
private static $db_version = '1.0.1';

/**
* Hold namespace
Expand Down

0 comments on commit 73ebe0d

Please sign in to comment.