Skip to content

Commit

Permalink
run the post install callback earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Apr 19, 2023
1 parent c04e2f2 commit af7a7cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/Services/PluginInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ public static function install( $plugin, $activate ) {
if ( \is_wp_error( $status ) ) {
return $status;
}
if ( is_callable( $plugin_post_install_callback ) ) {
$plugin_post_install_callback();
}
}

if ( $activate && ! \is_plugin_active( $plugin_path ) ) {
Expand All @@ -97,9 +100,6 @@ public static function install( $plugin, $activate ) {

return $status;
}
if ( is_callable( $plugin_post_install_callback ) ) {
$plugin_post_install_callback();
}
}

return new \WP_REST_Response(
Expand Down

0 comments on commit af7a7cf

Please sign in to comment.