The Toolset Blocks script frontend.js isn’t enqueued normally, an inline script is added to the page to load the script asynchronously.
Likewise the Toolset stylesheet toolset-blocks/vendor/toolset/blocks/public/css/style.css.
This mechanism can be disabled by adding the following constant to wp-config.php:
define( 'TB_SCRIPT_STYLE_LAZY_LOAD', false );
Then the script or stylesheet itself (both with the handle ‘toolset-blocks’) can be dequeued normally, e.g. for the script:
add_action( 'wp_print_scripts', 'ts_debug_scripts' );
function ts_debug_scripts( $handles ){
wp_dequeue_script( 'toolset-blocks' );
}
Support Thread Example
Let us know if this snippet is not working for you:
This snippet doesn’t work
To also dequeue the blocks CSS file, a client reports you can add the following code in the ts_debug_scripts function: