Skip to content

Instantly share code, notes, and snippets.

@adrianduffell
Last active October 27, 2023 06:37
Show Gist options
  • Save adrianduffell/308670dafe9014a5bb4df2f8f94c90ad to your computer and use it in GitHub Desktop.
Save adrianduffell/308670dafe9014a5bb4df2f8f94c90ad to your computer and use it in GitHub Desktop.
Fix CYS conflict with wpcom.editor
<?php
/*
* Plugin Name: CYS hotfix for conflict with wpcom.editor
* Author: Adrian Duffell
* Description: Hotfix until the following PR is deployed on Woo Express https://github.com/Automattic/wc-calypso-bridge/pull/1337
* Version: 1.0.0
*/
add_action( 'admin_print_scripts', function() {
if ( isset( $_GET['path'] ) && str_contains( wp_unslash( $_GET['path'] ), '/customize-store/' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
wp_dequeue_script( 'wpcom-block-editor-wpcom-editor-script' );
}
}, 9999);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment