woocommerce_delete_order_item_meta

The WooCommerce woocommerce delete order item meta function.

Description

woocommerce_delete_order_item_meta( $item_id, $meta_key, (string) $meta_value = '', (bool) $delete_all = false ); 

Parameters (4)

0. $item_id
The item id.
1. $meta_key
The meta key.
2. $meta_value — Optional. (string) => ''
The meta value.
3. $delete_all — Optional. (bool) => false
The delete all.

Usage

  1. if ( !function_exists( 'woocommerce_delete_order_item_meta' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The item id. 
  5. $item_id = null; 
  6.  
  7. // The meta key. 
  8. $meta_key = null; 
  9.  
  10. // The meta value. 
  11. $meta_value = ''; 
  12.  
  13. // The delete all. 
  14. $delete_all = false; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = woocommerce_delete_order_item_meta($item_id, $meta_key, $meta_value, $delete_all); 
  18.  

Defined (1)

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

/includes/wc-deprecated-functions.php  
  1. function woocommerce_delete_order_item_meta( $item_id, $meta_key, $meta_value = '', $delete_all = false ) { 
  2. return wc_delete_order_item_meta( $item_id, $meta_key, $meta_value, $delete_all );