Skip to content

Commit

Permalink
set filename to variable if needed to use as key
Browse files Browse the repository at this point in the history
  • Loading branch information
afragen committed Feb 4, 2025
1 parent e8f8615 commit c1e2ee0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Git_Updater/REST/REST_API.php
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ public function get_additions_api_data( \WP_REST_Request $request ) {
$slug = str_contains( $addition['type'], 'plugin' ) ? dirname( $addition['slug'] ) : $addition['slug'];

if ( array_key_exists( $slug, $gu_tokens ) ) {
$file = $gu_tokens[ $slug ]->file;
$request->set_param( 'slug', $slug );
$api_data[ $slug ] = $this->get_api_data( $request );
}
Expand Down

0 comments on commit c1e2ee0

Please sign in to comment.