Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions includes/class-freemius.php
Original file line number Diff line number Diff line change
Expand Up @@ -12381,16 +12381,33 @@ private function store_last_activated_license_data( FS_Plugin_License $license,
* @return bool
*/
function is_whitelabeled_by_flag( $ignore_data_debug_mode = false ) {
$is_whitelabeled = null;

if ( true !== $this->_storage->is_whitelabeled ) {
return false;
$is_whitelabeled = false;
} else if ( $ignore_data_debug_mode ) {
return true;
$is_whitelabeled = true;
}

$fs = $this->is_addon() ?
$this->get_parent_instance() :
$this;

$last_license_user_id = $fs->get_last_license_user_id();

if ( FS_User::is_valid_id( $last_license_user_id ) ) {
/**
* @var bool|null $is_whitelabeled
*
* @since 2.4.2
*/
$is_whitelabeled = $this->apply_filters( 'is_whitelabeled', $is_whitelabeled );
}

if ( ! is_null( $is_whitelabeled ) ) {
return $is_whitelabeled;
}

return ! $fs->is_data_debug_mode();
}

Expand Down
2 changes: 1 addition & 1 deletion start.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @var string
*/
$this_sdk_version = '2.4.1.0';
$this_sdk_version = '2.4.1.1';

#region SDK Selection Logic --------------------------------------------------------------------

Expand Down