diff --git a/projects/plugins/jetpack/changelog/fix-hide-seo-title-desc-fields b/projects/plugins/jetpack/changelog/fix-hide-seo-title-desc-fields new file mode 100644 index 0000000000000..758aff99f81a4 --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-hide-seo-title-desc-fields @@ -0,0 +1,4 @@ +Significance: patch +Type: bugfix + +SEO: Ensure that SEO fields are not visible when another SEO plugin is active. diff --git a/projects/plugins/jetpack/extensions/plugins/seo/seo.php b/projects/plugins/jetpack/extensions/plugins/seo/seo.php index 8404bb7b0be40..f5f791a7e1338 100644 --- a/projects/plugins/jetpack/extensions/plugins/seo/seo.php +++ b/projects/plugins/jetpack/extensions/plugins/seo/seo.php @@ -11,7 +11,16 @@ 'jetpack_register_gutenberg_extensions', function () { \Jetpack_Gutenberg::set_availability_for_plan( 'advanced-seo' ); - \Jetpack_Gutenberg::set_extension_available( 'jetpack-seo' ); + } +); + +add_action( + 'after_setup_theme', + function () { + // We only want to enable the SEO extension (and display SEO settings) if the 'jetpack_disable_seo_tools' filter is not set to false. + if ( ! apply_filters( 'jetpack_disable_seo_tools', false ) ) { + \Jetpack_Gutenberg::set_extension_available( 'jetpack-seo' ); + } } );