d( 'order-item' ); if ( $data_store->delete_metadata( $item_id, $meta_key, $meta_value, $delete_all ) ) { WC_Cache_Helper::invalidate_cache_group( 'object_' . $item_id ); // Invalidate cache. return true; } return false; } /** * WooCommerce Order Item Meta API - Get term meta. * * @param int $item_id Item ID. * @param string $key Meta key. * @param bool $single Whether to return a single value. (default: true). * * @throws Exception When `WC_Data_Store::load` validation fails. * @return mixed */ function wc_get_order_item_meta( $item_id, $key, $single = true ) { $data_store = WC_Data_Store::load( 'order-item' ); return $data_store->get_metadata( $item_id, $key, $single ); } /** * Get order ID by order item ID. * * @param int $item_id Item ID. * * @throws Exception When `WC_Data_Store::load` validation fails. * @return int */ function wc_get_order_id_by_order_item_id( $item_id ) { $data_store = WC_Data_Store::load( 'order-item' ); return $data_store->get_order_id_by_order_item_id( $item_id ); }
Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-content/plugins/woocommerce/includes/wc-order-item-functions.php:1) in /htdocs/wp-includes/pluggable.php on line 1435

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-content/plugins/woocommerce/includes/wc-order-item-functions.php:1) in /htdocs/wp-includes/pluggable.php on line 1438