How to use get_option() in Gutenberg block editor to retrieve global settings?
If your option is enabled in the REST API, e.g. by using register_setting() with ‘show_in_rest’ => true, you can use wp.data.select( ‘core’ ).getSite() to retrieve the value of your option, and to update the option, you can use wp.data.dispatch( ‘core’ ).saveSite(). So for example in your case: To get the option value: wp.data.select( ‘core’ ).getSite()?.autoupdate … Read more