ddw_wcde_woocommerce_is_editing_product

Helper function for checking if we are in "Edit Product" mode.

Description

ddw_wcde_woocommerce_is_editing_product(); 

Usage

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

Defined (1)

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

/includes/wcde-functions.php  
  1. function ddw_wcde_woocommerce_is_editing_product() { 
  2.  
  3. if ( ! empty( $_GET[ 'post_type' ] ) && 'product' == $_GET[ 'post_type' ] ) { 
  4.  
  5. return TRUE; 
  6.  
  7. } // end if 
  8.  
  9. if ( ! empty( $_GET[ 'post' ] ) && 'product' == get_post_type( $_GET[ 'post' ] ) ) { 
  10.  
  11. return TRUE; 
  12.  
  13. } // end if 
  14.  
  15. if ( ! empty( $_REQUEST[ 'post_id' ] ) && 'product' == get_post_type( $_REQUEST[ 'post_id' ] ) ) { 
  16.  
  17. return TRUE; 
  18.  
  19. } // end if 
  20.  
  21. return FALSE; 
  22.  
  23. } // end of function ddw_wcde_woocommerce_is_editing_product