This requires the @wordpress/scripts package but I don’t have the time to get into that now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { registerPlugin } from '@wordpress/plugins'; | |
import { select, dispatch } from '@wordpress/data'; | |
registerPlugin( 'disable-welcome-guide', { | |
render: function () { | |
return select( 'core/edit-post' ).isFeatureActive( 'welcomeGuide' ) && | |
dispatch( 'core/edit-post' ).toggleFeature( 'welcomeGuide' ); | |
}, | |
} ); |