Should not load admin scripts on other plugins’ pages
-
G’day,
This plugin is loading its scripts on other plugins’ admin pages. One serious problem this causes is Quick Edit is broken on WooCommerce.
Please only load your scripts when your plugin is doing something. Don’t load your scripts on admin pages that are not for your plugin.
For anyone requiring a quick fix, here’s some code that stops this plugin from breaking WooCommerce quick edit.
/** * stop Simple Event Calendar from breaking quick edit on WooCommerce products */ add_action('admin_enqueue_scripts', function($hook_suffix) { global $typenow; if ($hook_suffix === 'edit.php' && $typenow !== 'event_listing') { wp_dequeue_script('simple-event-planner-jQuery-ui-script'); wp_dequeue_script('simple-event-planner-rubaxa-script'); wp_dequeue_script('simple-event-planner-admin-scripts'); wp_dequeue_script('simple-event-planner-jquery-datepicker'); wp_dequeue_script('simple-event-planner-jquery-geocomplete'); wp_dequeue_script('simple-event-planner-jquery-gmaps-latlon-picker'); } }, 20);
cheers,
Ross
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Should not load admin scripts on other plugins’ pages’ is closed to new replies.