## differentiate hooks and filters on the same page

Question

I’ve simplified my woocommerce by putting my cart and checkout all in one page. The annoying part of this is how to differentiate hooks and filters. Every example I see uses a page check like:

if ( !function_exists( 'turn_shipping_off_on_cart_view_only' ) ){
function turn_shipping_off_on_cart_view_only(){
if ( is_cart() ){
return false;
}
return true;
}
}