Code Duplication    Length = 4-4 lines in 2 locations

includes/class-wpinv-item.php 2 locations

@@ 112-115 (lines=4) @@
109
        
110
        $item = WP_Post::get_instance( $id );
111
        
112
        if (!empty($item) && !empty($data['meta'])) {
113
            $this->ID = $item->ID;
114
            $this->save_metas($data['meta']);
115
        }
116
        
117
        // Set custom id if not set.
118
        if ( empty( $data['meta']['custom_id'] ) && !$this->get_custom_id() ) {
@@ 146-149 (lines=4) @@
143
        }
144
145
        $item = WP_Post::get_instance( $id );
146
        if (!empty($item) && !empty($data['meta'])) {
147
            $this->ID = $item->ID;
148
            $this->save_metas($data['meta']);
149
        }
150
        
151
        // Set custom id if not set.
152
        if ( empty( $data['meta']['custom_id'] ) && !$this->get_custom_id() ) {