Skip to content

Commit

Permalink
Remove unncessary check
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Oct 14, 2024
1 parent f0e519a commit 443b90a
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions includes/Services/PluginInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,21 +161,8 @@ public static function install_from_wordpress( $plugin, $activate ) {
* @return \WP_Error|\WP_REST_Response
*/
public static function install_premium_plugin( $plugin, $activate ) {
$status_codes = Plugins::get_status_codes();

$premium_status = self::get_plugin_status( $plugin );

// Check if the premium plugin is already installed or active
if ( $status_codes['active'] === $premium_status || $status_codes['installed'] === $premium_status ) {
return new \WP_REST_Response(
array(
'message' => __( 'Premium plugin already installed or active: ', 'wp-module-installer' ) . $plugin,
),
200
);
}

$pls_utility = new PLSUtility();

// Provision a license for the premium plugin
$license_response = $pls_utility->provision_license( $plugin );
if ( is_wp_error( $license_response ) ) {
Expand Down

0 comments on commit 443b90a

Please sign in to comment.