is_woocommerce

Is_woocommerce - Returns true if on a page which uses WooCommerce templates (cart and checkout are standard pages with shortcodes and thus are not included).

Description

is_woocommerce(); 

Usage

  1. if ( !function_exists( 'is_woocommerce' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-conditional-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = is_woocommerce(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-conditional-functions.php  
  1. function is_woocommerce() { 
  2. return apply_filters( 'is_woocommerce', ( is_shop() || is_product_taxonomy() || is_product() ) ? true : false );