| Conditions | 1 |
| Paths | 1 |
| Total Lines | 33 |
| Code Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public static function output( $post ) { |
||
| 23 | |||
| 24 | // Fetch the invoice. |
||
| 25 | $invoice = new WPInv_Invoice( $post ); |
||
| 26 | |||
| 27 | do_action( 'wpinv_metabox_resend_invoice_before', $invoice ); |
||
| 28 | |||
| 29 | $email_url = esc_url( |
||
| 30 | add_query_arg( |
||
| 31 | array( |
||
| 32 | 'wpi_action' => 'send_invoice', |
||
| 33 | 'invoice_id' => $invoice->get_id(), |
||
| 34 | 'wpinv-message' => false, |
||
| 35 | ) |
||
| 36 | ) |
||
| 37 | ); |
||
| 38 | |||
| 39 | $reminder_url = esc_url( |
||
| 40 | add_query_arg( |
||
| 41 | array( |
||
| 42 | 'wpi_action' => 'send_reminder', |
||
| 43 | 'invoice_id' => $invoice->get_id(), |
||
| 44 | 'wpinv-message' => false, |
||
| 45 | ) |
||
| 46 | ) |
||
| 47 | ); |
||
| 48 | ?> |
||
| 49 | <p class="wpi-meta-row wpi-resend-info"><?php _e( "This will send a copy of the invoice to the customer's email address.", 'invoicing' ); ?></p> |
||
| 50 | <p class="wpi-meta-row wpi-resend-email"><a href="<?php echo $email_url; ?>" class="button button-secondary"><?php _e( 'Resend Invoice', 'invoicing' ); ?></a></p> |
||
| 51 | <p class="wpi-meta-row wpi-send-reminder"><a title="<?php esc_attr_e( 'Send overdue reminder notification to customer', 'invoicing' ); ?>" href="<?php echo $reminder_url; ?>" class="button button-secondary"><?php esc_attr_e( 'Send Reminder', 'invoicing' ); ?></a></p> |
||
| 52 | <?php |
||
| 53 | |||
| 54 | do_action( 'wpinv_metabox_resend_invoice_after', $invoice ); |
||
| 55 | |||
| 59 |