Skip to content

Commit

Permalink
Merge pull request #238 from Freemius/feature/premium-version-downloa…
Browse files Browse the repository at this point in the history
…d-link-fix

[account] [link] Fixed the download link for the premium version when…
  • Loading branch information
vovafeldman authored May 31, 2018
2 parents 5bc3b7c + 6bdf3fa commit 7b1abe3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions includes/class-freemius.php
Original file line number Diff line number Diff line change
Expand Up @@ -17287,9 +17287,10 @@ private function _get_latest_version_endpoint( $addon_id = false, $type = 'json'

$is_premium = null;
if ( ! $is_addon ) {
$is_premium = $this->is_premium();
$is_premium = ( $this->is_premium() || $this->_can_download_premium() );
} else if ( $this->is_addon_activated( $addon_id ) ) {
$is_premium = self::get_instance_by_id( $addon_id )->is_premium();
$fs_addon = self::get_instance_by_id( $addon_id );
$is_premium = ( $fs_addon->is_premium() || $fs_addon->_can_download_premium() );
}

// If add-on, then append add-on ID.
Expand Down

0 comments on commit 7b1abe3

Please sign in to comment.