Skip to content

Commit

Permalink
Merge pull request #5 from jessepearson/fix/github-updater
Browse files Browse the repository at this point in the history
Fixed GitHub updater
  • Loading branch information
jessepearson authored Oct 6, 2020
2 parents 7dcddf5 + 6dc7c40 commit 02b263d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*** WooCommerce Support Helper Changelog ***

2020-10-06 - version 1.1.3
* Fix - Fixed GitHub updater.

2020-10-05 - version 1.1.2
* Fix - Commented out GitHub repo file and method due to errors.

Expand Down
1 change: 0 additions & 1 deletion includes/class-wcsh-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ public function modify_transient( $transient ) {
$this->get_repository_info();
$out_of_date = version_compare( $this->github_response['tag_name'], $checked[ $this->basename ], '>' );


// If it's out of date.
if ( $out_of_date ) {

Expand Down
12 changes: 7 additions & 5 deletions woocommerce-support-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Author: Jesse Pearson
* Author URI: https://github.com/jessepearson/
* Text Domain: woocommerce-support-helper
* Version: 1.1.2
* Version: 1.1.3
*/

if ( ! defined( 'ABSPATH' ) ) {
Expand All @@ -26,27 +26,29 @@ class WooCommerce_Support_Helper {
* Constructor.
*
* @since 1.0.0
* @version 1.1.2
* @version 1.1.3
*/
public function __construct() {
add_action( 'init', array( $this, 'includes' ) );
//add_action( 'init', array( $this, 'plugin_updater' ) );
add_action( 'init', array( $this, 'plugin_updater' ), 20 );
}

/**
* Includes needed files.
*
* @since 1.0.0
* @version 1.1.2
* @version 1.1.3
*/
public function includes() {

// Updater class is needed outside of the admin.
require_once( dirname( __FILE__ ) .'/includes/class-wcsh-updater.php' );

// Files only the admin needs.
if ( is_admin() ) {
require_once( dirname( __FILE__ ) .'/includes/class-wcsh-logger.php' );
require_once( dirname( __FILE__ ) .'/includes/class-wcsh-tools.php' );
require_once( dirname( __FILE__ ) .'/includes/class-wcsh-file-handler.php' );
//require_once( dirname( __FILE__ ) .'/includes/class-wcsh-updater.php' );
require_once( dirname( __FILE__ ) .'/includes/class-wcsh-export.php' );
require_once( dirname( __FILE__ ) .'/includes/class-wcsh-import.php' );
require_once( dirname( __FILE__ ) .'/includes/class-wcsh-shipping-export.php' );
Expand Down

0 comments on commit 02b263d

Please sign in to comment.