Skip to content

Commit

Permalink
Dequeue wpcom.editor on cys pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasfoo committed Oct 27, 2023
1 parent e58d4e7 commit 0c3ef5a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions includes/class-wc-calypso-bridge-customize-store.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ private function __construct() {
add_action( 'load-site-editor.php', array( $this, 'mark_customize_store_task_as_completed_on_site_editor' ) );
}
});

// wpcom.editor.js conflicts with CYS scripts due to double registration of the private-apis
// dequeue it on CYS pages.
add_action( 'admin_print_scripts', function() {
if ( str_contains( $_GET['path'], '/customize-store/' ) ) {

Check failure on line 47 in includes/class-wc-calypso-bridge-customize-store.php

View workflow job for this annotation

GitHub Actions / PHP / Coding standards

Detected usage of a non-validated input variable: $_GET

Check failure on line 47 in includes/class-wc-calypso-bridge-customize-store.php

View workflow job for this annotation

GitHub Actions / PHP / Coding standards

Missing wp_unslash() before sanitization.

Check failure on line 47 in includes/class-wc-calypso-bridge-customize-store.php

View workflow job for this annotation

GitHub Actions / PHP / Coding standards

Detected usage of a non-sanitized input variable: $_GET
wp_dequeue_script( 'wpcom-block-editor-wpcom-editor-script' );
}
}, 9999);
}

/**
Expand Down

0 comments on commit 0c3ef5a

Please sign in to comment.