Changeset 3119 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/sponsor-invoices-dashboard.php
- Timestamp:
- 05/11/2016 11:21:02 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/sponsor-invoices-dashboard.php
r3109 r3119 323 323 $invoice_url = admin_url( sprintf( 'post.php?post=%s&action=edit', $invoice_id ) ); 324 324 $headers = array( 'Reply-To: support@wordcamp.org' ); 325 $attachments = array(); 326 $attachment_message = ''; 327 $invoice_filename = false; 328 // todo realign 325 329 326 330 if ( 'approved' === $new_status ) { … … 328 332 $sponsor_email = get_post_meta( $sponsor_id, '_wcpt_sponsor_email_address', true ); 329 333 $status_message = "has been sent to $sponsor_name via $sponsor_email. You will receive another notification when they have paid the invoice."; 334 $qbo_invoice_id = get_post_meta( $invoice_id, '_wcbsi_qbo_invoice_id', true ); 335 $invoice_filename = \WordCamp_QBO_Client::get_invoice_filename( $qbo_invoice_id ); 336 // todo realign 337 338 if ( ! is_wp_error( $invoice_filename ) ) { 339 $attachments[] = $invoice_filename; 340 $attachment_message = "\nA copy of the invoice has been attached to this message, in case you need to follow up with the sponsor."; 341 } 330 342 } elseif ( 'paid' === $new_status ) { 331 343 $status_message = "has been paid by $sponsor_name. Go ahead and publish them to your website!"; … … 340 352 341 353 $invoice_url 354 $attachment_message 342 355 343 356 If you have any questions, please reply to let us know." 344 357 ); 345 358 346 wp_mail( $to, $subject, $message, $headers ); 359 wp_mail( $to, $subject, $message, $headers, $attachments ); 360 361 if ( $invoice_filename ) { 362 unlink( $invoice_filename ); 363 } 347 364 348 365 restore_current_blog();
Note: See TracChangeset
for help on using the changeset viewer.