Skip to content

Commit e959ea9

Browse files
committed
update checks for AJAX install
1 parent bda7a61 commit e959ea9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Git_Updater/Traits/GU_Trait.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,9 @@ final protected function get_repo_slugs( $slug, $upgrader_object = null ) {
483483
array_pop( $rename );
484484
$rename = implode( '-', $rename );
485485

486-
// For AJAX install need to exit as slug is correct. Refer to Add-Ons.
487-
if ( check_ajax_referer( 'updates' ) ) {
488-
if ( isset( $_POST['action'] ) && str_contains( sanitize_key( wp_unslash( $_POST['action'] ) ), 'install' ) ) {
486+
// For AJAX install, not from Install tab, need to exit as slug is correct. Refer to Add-Ons.
487+
if ( ! isset( $_POST['git_updater_repo'] ) && isset( $_POST['action'] ) && check_ajax_referer( 'updates' ) ) {
488+
if ( str_contains( sanitize_key( wp_unslash( $_POST['action'] ) ), 'install' ) ) {
489489
return $arr;
490490
}
491491
}

0 commit comments

Comments
 (0)