Skip to content

Commit 7d56343

Browse files
committed
fix: site type issue in template sharing
1 parent 073eb70 commit 7d56343

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

assets/src/admin/templates/components/BrandSiteTemplates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const BrandSiteTemplates = ( {
6363
},
6464
body: JSON.stringify( {
6565
template_ids: selectedTemplates,
66-
site: currentSiteId,
66+
site: currentSiteId.toString(),
6767
is_remove_all: false,
6868
} ),
6969
},

inc/classes/class-utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public static function get_site_by_id( string $site_id ): array|null {
205205
$filtered = array_filter(
206206
$sites,
207207
function ( $site ) use ( $site_id ): bool {
208-
return $site['id'] === $site_id;
208+
return (string) $site['id'] === (string) $site_id;
209209
}
210210
);
211211

0 commit comments

Comments
 (0)