-
Notifications
You must be signed in to change notification settings - Fork 53
Demo Sites: Ensure demo site uses WP version same as local site #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
wojtekn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code change looks clean. I left two minor comments.
Could we send the WP version with the demo site update request, too?
src/hooks/use-archive-site.ts
Outdated
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: the condition is clear enough, so we don't need the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update
Line 32 in 28aa115
| getWpVersion: ( wordPressPath: string ) => ipcRenderer.invoke( 'getWpVersion', wordPressPath ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!, thanks for the early feedback.
Changed 691fa9a
|
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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