wc_gzd_unset_crud_meta_data

The WooCommerce Germanized wc gzd unset crud meta data function.

Description

wc_gzd_unset_crud_meta_data( $object, $key ); 

Parameters (2)

0. $object
The object.
1. $key
The key.

Usage

  1. if ( !function_exists( 'wc_gzd_unset_crud_meta_data' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-germanized/includes/wc-gzd-legacy-functions.php'; 
  3.  
  4. // The object. 
  5. $object = null; 
  6.  
  7. // The key. 
  8. $key = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = wc_gzd_unset_crud_meta_data($object, $key); 
  12.  

Defined (1)

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

/includes/wc-gzd-legacy-functions.php  
  1. function wc_gzd_unset_crud_meta_data( $object, $key ) { 
  2. if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) { 
  3. $object->delete_meta_data( $key ); 
  4. } else { 
  5. delete_post_meta( wc_gzd_get_crud_data( $object, 'id' ), $key ); 
  6. return $object;