I can’t enter in function is_woocommerce() when I use wp_headers hook filter
-
I have this function,but I can enter in the function is_woocommerce(). if I put this code:
function the_name ($headers){ if ( function_exists( 'is_woocommerce' ) ) { if ( is_woocommerce() ) { $headers['Cache-Control']="public, max-age=0, s-maxage=10800"; return $headers; } } } add_filter('wp_headers', 'the_name');
it is enter in is_woocommerce BUT it doesn’t enter in is_woocommerce(). How can I do to enter in this function when I use wp_headers filter?
Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘I can’t enter in function is_woocommerce() when I use wp_headers hook filter’ is closed to new replies.