Code Duplication    Length = 4-4 lines in 2 locations

includes/class-wpinv-item.php 2 locations

@@ 98-101 (lines=4) @@
95
        
96
        $item = WP_Post::get_instance( $id );
97
        
98
        if (!empty($item) && !empty($data['meta'])) {
99
            $this->ID = $item->ID;
100
            $this->save_metas($data['meta']);
101
        }
102
        
103
        // Set custom id if not set.
104
        if ( empty( $data['meta']['custom_id'] ) && !$this->get_custom_id() ) {
@@ 132-135 (lines=4) @@
129
        }
130
131
        $item = WP_Post::get_instance( $id );
132
        if (!empty($item) && !empty($data['meta'])) {
133
            $this->ID = $item->ID;
134
            $this->save_metas($data['meta']);
135
        }
136
        
137
        // Set custom id if not set.
138
        if ( empty( $data['meta']['custom_id'] ) && !$this->get_custom_id() ) {