Code Duplication    Length = 8-9 lines in 2 locations

includes/class-wc-order-item.php 2 locations

@@ 287-295 (lines=9) @@
284
	 * @since 2.6.0
285
     * @access private
286
     */
287
    private function create() {
288
        global $wpdb;
289
		$wpdb->insert( $wpdb->prefix . 'woocommerce_order_items', array(
290
            'order_item_name' => $this->get_name(),
291
            'order_item_type' => $this->get_type(),
292
            'order_id'        => $this->get_order_id()
293
        ) );
294
		$this->set_item_id( $wpdb->insert_id );
295
	}
296
297
    /**
298
     * Update data in the database.
@@ 302-309 (lines=8) @@
299
	 * @since 2.6.0
300
	 * @access private
301
     */
302
    private function update() {
303
        global $wpdb;
304
		$wpdb->update( $wpdb->prefix . 'woocommerce_order_items', array(
305
            'order_item_name' => $this->get_name(),
306
            'order_item_type' => $this->get_type(),
307
            'order_id'        => $this->get_order_id()
308
        ), array( 'order_item_id' => $this->get_order_item_id() ) );
309
    }
310
311
	/**
312
     * Read from the database.