woocommerce_delete_order_item

woocommerce_delete_order_item

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_delete_order_item') is found 2 times:

  • /includes/data-stores/abstract-wc-order-item-type-data-store.php line 107
    			global $wpdb;
    			do_action( 'woocommerce_before_delete_order_item', $item->get_id() );
    			$wpdb->delete( $wpdb->prefix . 'woocommerce_order_items', array( 'order_item_id' => $item->get_id() ) );
    			$wpdb->delete( $wpdb->prefix . 'woocommerce_order_itemmeta', array( 'order_item_id' => $item->get_id() ) );
    			do_action( 'woocommerce_delete_order_item', $item->get_id() );
    			$this->clear_cache( $item );
    		}
    	}
    
    	/**
    	 * Read a order item from the database.
    
  • /includes/wc-order-item-functions.php line 88
    	do_action( 'woocommerce_before_delete_order_item', $item_id );
    
    	$data_store->delete_order_item( $item_id );
    
    	do_action( 'woocommerce_delete_order_item', $item_id );
    
    	return true;
    }
    
    /**
     * WooCommerce Order Item Meta API - Update term meta.
    

See this hook used in plugins: