Code Duplication    Length = 5-5 lines in 2 locations

includes/class-wpinv-invoice.php 1 location

@@ 2513-2517 (lines=5) @@
2510
2511
        $args = wp_parse_args( $data, $defaults );
2512
2513
        if ( $args['expiration'] && strtotime( 'NOW', current_time( 'timestamp' ) ) > strtotime( $args['expiration'], current_time( 'timestamp' ) ) ) {
2514
            if ( 'active' == $args['status'] || $args['status'] == 'trialing' ) {
2515
                $args['status'] = 'expired';
2516
            }
2517
        }
2518
2519
        do_action( 'wpinv_subscription_pre_create', $args, $data, $this );
2520
        

includes/class-wpinv-subscription.php 1 location

@@ 106-110 (lines=5) @@
103
104
        $args = wp_parse_args( $data, $defaults );
105
106
        if ( $args['expiration'] && strtotime( 'NOW', current_time( 'timestamp' ) ) > strtotime( $args['expiration'], current_time( 'timestamp' ) ) ) {
107
            if ( 'active' == $args['status'] || 'trialling' == $args['status'] ) {
108
                $args['status'] = 'expired';
109
            }
110
        }
111
112
        do_action( 'wpinv_subscription_pre_create', $args );
113