Code Duplication    Length = 11-11 lines in 2 locations

includes/wpinv-template-functions.php 2 locations

@@ 80-90 (lines=11) @@
77
    do_action('wpinv_invoice_display_right_actions', $invoice);
78
}
79
80
function wpinv_before_invoice_content( $content ) {
81
    global $post;
82
83
    if ( !empty( $post ) && $post->post_type == 'wpi_invoice' && is_singular( 'wpi_invoice' ) && is_main_query() ) {
84
        ob_start();
85
        do_action( 'wpinv_before_invoice_content', $post->ID );
86
        $content = ob_get_clean() . $content;
87
    }
88
89
    return $content;
90
}
91
add_filter( 'the_content', 'wpinv_before_invoice_content' );
92
93
function wpinv_after_invoice_content( $content ) {
@@ 93-103 (lines=11) @@
90
}
91
add_filter( 'the_content', 'wpinv_before_invoice_content' );
92
93
function wpinv_after_invoice_content( $content ) {
94
    global $post;
95
96
    if ( !empty( $post ) && $post->post_type == 'wpi_invoice' && is_singular( 'wpi_invoice' ) && is_main_query() ) {
97
        ob_start();
98
        do_action( 'wpinv_after_invoice_content', $post->ID );
99
        $content .= ob_get_clean();
100
    }
101
102
    return $content;
103
}
104
add_filter( 'the_content', 'wpinv_after_invoice_content' );
105
106
function wpinv_get_templates_dir() {