Code Duplication    Length = 4-4 lines in 2 locations

includes/class-wpinv-item.php 2 locations

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