From ea96bea77e392bbda399ca600804c13734663bae Mon Sep 17 00:00:00 2001 From: Nathan Silveira Date: Fri, 19 Apr 2024 13:47:13 -0300 Subject: [PATCH] Highlighting text in the product's description of the new product editor is not visible inside editor (#46728) * Enqueue global presets css while loading the new product editor * Change from gutenberg to wp prefix --- plugins/woocommerce/changelog/fix-gutenberg-global-presets | 4 ++++ .../src/Admin/Features/ProductBlockEditor/Init.php | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 plugins/woocommerce/changelog/fix-gutenberg-global-presets diff --git a/plugins/woocommerce/changelog/fix-gutenberg-global-presets b/plugins/woocommerce/changelog/fix-gutenberg-global-presets new file mode 100644 index 00000000000..1932873db75 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-gutenberg-global-presets @@ -0,0 +1,4 @@ +Significance: minor +Type: fix + +Highlighting text in the product's description of the new product editor is not visible inside editor diff --git a/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/Init.php b/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/Init.php index a78aa340e89..7e915895864 100644 --- a/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/Init.php +++ b/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/Init.php @@ -115,6 +115,9 @@ class Init { ); wp_tinymce_inline_scripts(); wp_enqueue_media(); + wp_register_style( 'wc-global-presets', false ); // phpcs:ignore + wp_add_inline_style( 'wc-global-presets', wp_get_global_stylesheet( array( 'presets' ) ) ); + wp_enqueue_style( 'wc-global-presets' ); } /**