I install my plugin at old test site and got design problem because of css from other plugins. I try this code to remove all of them but it removes a few only:
function remove_all_theme_styles() {
global $wp_styles;
$wp_styles->queue = array();
foreach ( $wp_styles->queue as $style ) :
if ( 'idcrm-contacts' !== $style && 'monster-style' !== $style ) {
wp_deregister_style( $style );
wp_dequeue_style( $style );
}
endforeach;
}
add_action( 'wp_print_styles', 'remove_all_theme_styles', 999 );
I try var_dump and doesn’t see all other css but I see it in page code. I think maybe these css loads after my plugin and looking for answer how tou use my code in the end off all loadings.