Skip to content

Commit 75a5a99

Browse files
committed
updated the publish action
1 parent 62d76e4 commit 75a5a99

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

functions.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -326,19 +326,19 @@ function pc_3dscan_sortable_columns( $columns ) {
326326

327327
class pc_scan_emailer {
328328
function send($post_ID) {
329-
$args = array(
330-
'post_type' => 'attachment',
331-
'numberposts' => -1,
332-
'post_status' => null,
333-
'post_mime_type' => 'application/zip',
334-
'post_parent' => get_the_ID()
335-
);
336-
337-
$attachments = get_posts($args);
338-
if ($attachments) :
339-
setup_postdata($attachments[0]);
340-
$link = wp_get_attachment_url($post->ID);
341-
endif;
329+
// $args = array(
330+
// 'post_type' => 'attachment',
331+
// 'numberposts' => -1,
332+
// 'post_status' => null,
333+
// 'post_mime_type' => 'application/zip',
334+
// 'post_parent' => get_the_ID()
335+
// );
336+
337+
// $attachments = get_posts($args);
338+
// if ($attachments) :
339+
// setup_postdata($attachments[0]);
340+
// $link = wp_get_attachment_url($post->ID);
341+
// endif;
342342

343343
$blog_url = bloginfo('url');
344344
$email = get_post_meta($post_ID, 'pc_3dscan_email', true);
@@ -347,7 +347,7 @@ function send($post_ID) {
347347
$to = &$email;
348348
$headers = 'From: My 3D Scan <info@my3dscan.ca>' . "\r\n" . 'Reply-To: info@my3dscan.ca';
349349
$subject = "$name, your 3D Scan is now ready!"
350-
$body = "Hey $name,\n\nYour 3D Scan is now ready. You can download it here: $link \n\n\nOR\n\n\nGo to $blog_url/download and enter your email or twitter handle (if you provided us with it).\n\nPEACE!\n\n@My3DScan\n\n@DraftPrint3D\n\n@PeopleAndCode";
350+
$body = "Hey $name,\n\nYour 3D Scan is now ready. You can download it here: \n\n\nOR\n\n\nGo to $blog_url/download and enter your email or twitter handle (if you provided us with it).\n\nPEACE!\n\n@My3DScan\n\n@DraftPrint3D\n\n@PeopleAndCode";
351351

352352
wp_mail($to, $subject, $body, $headers );
353353
return $post_ID;

0 commit comments

Comments
 (0)