Skip to content

Commit cfebf3a

Browse files
committed
Fix delete query for site transients in multisite
1 parent 9f6c300 commit cfebf3a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Transient_Command.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,11 @@ private function delete_all() {
319319
);
320320
} else {
321321
// Multisite stores site transients in the sitemeta table.
322-
$count += $wpdb->prepare(
323-
"DELETE FROM $wpdb->sitemeta WHERE option_name LIKE %s",
324-
Utils\esc_like( '_site_transient_' ) . '%'
322+
$count += $wpdb->query(
323+
$wpdb->prepare(
324+
"DELETE FROM $wpdb->sitemeta WHERE meta_key LIKE %s",
325+
Utils\esc_like( '_site_transient_' ) . '%'
326+
)
325327
);
326328
}
327329

0 commit comments

Comments
 (0)