Code Duplication    Length = 3-3 lines in 2 locations

includes/class-wpinv-item.php 2 locations

@@ 120-122 (lines=3) @@
117
        }
118
        
119
        // Set custom id if not set.
120
        if ( empty( $data['meta']['custom_id'] ) && !$this->get_custom_id() ) {
121
            $this->save_metas( array( 'custom_id' => $id ) );
122
        }
123
124
        do_action( 'wpinv_item_create', $id, $args );
125
@@ 154-156 (lines=3) @@
151
        }
152
        
153
        // Set custom id if not set.
154
        if ( empty( $data['meta']['custom_id'] ) && !$this->get_custom_id() ) {
155
            $this->save_metas( array( 'custom_id' => $id ) );
156
        }
157
158
        do_action( 'wpinv_item_update', $id, $data );
159