diff --git a/projects/packages/forms/changelog/fix-contact-form-package-script-build b/projects/packages/forms/changelog/fix-contact-form-package-script-build new file mode 100644 index 0000000000000..f41a436958da8 --- /dev/null +++ b/projects/packages/forms/changelog/fix-contact-form-package-script-build @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Forms: Ensuring non minified JS file location is also an option when loading the tiny-mce-plugin-form-button script file. diff --git a/projects/packages/forms/src/contact-form/class-editor-view.php b/projects/packages/forms/src/contact-form/class-editor-view.php index c0f80cf21f4f2..9318e68c21cb2 100644 --- a/projects/packages/forms/src/contact-form/class-editor-view.php +++ b/projects/packages/forms/src/contact-form/class-editor-view.php @@ -59,10 +59,7 @@ public static function grunion_media_button() { * @return array */ public static function mce_external_plugins( $plugin_array ) { - $plugin_array['grunion_form'] = Assets::get_file_url_for_environment( - 'jetpack_vendor/automattic/jetpack-forms/dist/contact-form/js/tinymce-plugin-form-button.js', - 'jetpack_vendor/automattic/jetpack-forms/dist/contact-form/js/tinymce-plugin-form-button.js' - ); + $plugin_array['grunion_form'] = plugins_url( '../../dist/contact-form/js/tinymce-plugin-form-button.js', __FILE__ ); return $plugin_array; }