Demo Sites: Ensure demo site uses WP version same as local site - #36
Conversation
wojtekn
left a comment
There was a problem hiding this comment.
The code change looks clean. I left two minor comments.
Could we send the WP version with the demo site update request, too?
| const formData = [ [ 'import', file ] ]; | ||
| const wordpressVersion = await getIpcApi().getWpVersion( siteId ); | ||
| if ( wordpressVersion.length >= 3 ) { | ||
| // Minimum version length is '6.0' |
There was a problem hiding this comment.
Nitpick: the condition is clear enough, so we don't need the comment
There was a problem hiding this comment.
Thanks for confirming it. I was not sure if it was clear enough.
I was thinking to make a comparison like, but I preferred to add it as a comment.
if ( wordpressVersion.length >= 'x.y'.length ) {
Anyway, if it's not clear for everybody, now they can read these comments 👍
Removed the comment: d58a3ac
| } | ||
|
|
||
| export async function getWpVersion( _event: IpcMainInvokeEvent, wordPressPath: string ) { | ||
| export async function getWpVersion( _event: IpcMainInvokeEvent, id: string ) { |
|
@katinthehatsite, thanks for reviewing it!. The best way is running a query on our end. I updated the description on D146651-code, that seems it was overwritten with an old version. |
wojtekn
left a comment
There was a problem hiding this comment.
I tested this with the server-side diff, and everything worked as expected.

Proposed Changes
Testing Instructions
wp core update --version=6.4.1 --forcedemo.sites.match.local.wordpress.site.mp4
Pre-merge Checklist