Skip to content

Commit

Permalink
[parallel-activation] Create a POC for parallel activation of free an…
Browse files Browse the repository at this point in the history
…d paid plugins.
  • Loading branch information
swashata committed Aug 19, 2024
1 parent 8285a8a commit a4c74db
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions includes/class-freemius.php
Original file line number Diff line number Diff line change
Expand Up @@ -9737,6 +9737,13 @@ function set_basename( $is_premium, $caller ) {
$plugin_dir . $basename,
array( &$this, '_activate_plugin_event_hook' )
);

// If the instance was created with a free version, yet now it's premium, we need to update the plugin object.
if ( $is_premium && ! $this->is_premium() && is_object( $this->_plugin ) ) {
$this->_plugin->update( array(
'is_premium' => true,
) );
}
}

/**
Expand Down

0 comments on commit a4c74db

Please sign in to comment.