There are 2 special filters available for that purpose.
One for styles – “gb_hcc_preserve_styles”
Another one for scripts – “gb_hcc_preserve_scripts”
Let’s say you need to keep the stylesheet added by one of the Thrive plugins on your Handsome Checkout page, but it’s getting removed to optimize the page.
How to deal with that?
First you need to find the id of your script or stylesheet.
Open your default WooCommerce checkout page.
Open the HTML source of the page.
Locate the stylesheet/script you need and copy the id (like on the screenshot below):
Then use the snippet below to fix the issue:
Important: sometimes you will have to the remove the generic “-css” ending to make it work. So, it would be “thrive-woo-style”.
function wckb_keep_my_style( $excluded_styles )
$excluded_styles = 'thrive-woo-style'; // your script id
add_filter( 'gb_hcc_preserve_styles', 'wckb_keep_my_style' );