|
@@ 2173-2177 (lines=5) @@
|
| 2170 |
|
$error = __( 'This invoice is only viewable by clicking on the invoice link that sent to you via email.', 'invoicing' ); |
| 2171 |
|
if ( !empty( $invoice->ID ) && $invoice->has_status( array_keys( wpinv_get_invoice_statuses() ) ) ) { |
| 2172 |
|
if ( is_user_logged_in() ) { |
| 2173 |
|
if ( wpinv_require_login_to_checkout() ) { |
| 2174 |
|
if ( isset( $_GET['invoice_key'] ) && $_GET['invoice_key'] === $invoice->get_key() ) { |
| 2175 |
|
$error = __( 'You are not allowed to view this invoice.', 'invoicing' ); |
| 2176 |
|
} |
| 2177 |
|
} |
| 2178 |
|
} else { |
| 2179 |
|
if ( wpinv_require_login_to_checkout() ) { |
| 2180 |
|
if ( isset( $_GET['invoice_key'] ) && $_GET['invoice_key'] === $invoice->get_key() ) { |
|
@@ 2178-2184 (lines=7) @@
|
| 2175 |
|
$error = __( 'You are not allowed to view this invoice.', 'invoicing' ); |
| 2176 |
|
} |
| 2177 |
|
} |
| 2178 |
|
} else { |
| 2179 |
|
if ( wpinv_require_login_to_checkout() ) { |
| 2180 |
|
if ( isset( $_GET['invoice_key'] ) && $_GET['invoice_key'] === $invoice->get_key() ) { |
| 2181 |
|
$error = __( 'You must be logged in to view this invoice.', 'invoicing' ); |
| 2182 |
|
} |
| 2183 |
|
} |
| 2184 |
|
} |
| 2185 |
|
} else { |
| 2186 |
|
$error = __( 'This invoice is deleted or does not exist.', 'invoicing' ); |
| 2187 |
|
} |