I have a peice of code that I know works where I set the pointer events for the shopping cart icon dependant on what page the user is on:
add_action('posts_selection', 'check_cart_checkout_page');
function check_cart_checkout_page(){
if(is_cart() || is_checkout()){
echo '<style>.ast-header-woo-cart { pointer-events:none;}</style>';
}
else{
echo '<style>.ast-header-woo-cart { pointer-events:auto;}</style>';
}
}
However I noticed that when this code snippet is activated, it causes the order summary block to be stuck on spinner loader (see image below). Not sure why this is? I deactivated all other code snippets and it's this code that's causing it. Priority of this snippet is 10.