What is in the filterPostie.php file?
This is the file contents in their entirety:
<?php
function BW_postie_email_notify_body($body, $postemail, $postid) {
$user_id = get_post_field('post_author', $postid);
$points = mycred_get_users_cred($user_id);
if(!empty($points)) {
return "Congratulations. \nYour content (TITLE) was successfully submitted and is awaiting approval. \nYou have ".$points." total points. \nVisit the link below to start redeeming your points.";
} else {
return "Congratulations. \nYour content (TITLE) was successfully submitted and is awaiting approval. \nYou have UNKNOWN total points. \nVisit the link below to start redeeming your points.";
}
}
add_filter('postie_email_notify_body', 'BW_postie_email_notify_body', 10, 3);
?>
You need to look in the logs to see if there is an error happening.
This is the log after running the script twice:
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: Starting mail fetch
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: Postie Version: 1.8.12
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: WordPress Version: 4.5
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: PHP Version: 5.5.32
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: OS: Linux vps9377.inmotionhosting.com 2.6.32-042stab113.11 #1 SMP Thu Aug 11 09:41:14 MSK 2016 x86_64
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: POSTIE_DEBUG: On
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: Time: 2016-10-26 15:25:17 GMT
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: Error log: /home/sapien13/public_html/c4cdemo/wp-content/error_logs.txt
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: TMP dir: /tmp/
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: Postie is in /home/sapien13/public_html/c4cdemo/wp-content/plugins/postie/
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: cURL version: 7.38.0
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: Cron: On
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: Alternate Cron: Off
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: wp_content_path: /home/sapien13/public_html/c4cdemo/wp-content
[26-Oct-2016 15:25:17 US/Central] Postie [debug]: found filterPostie.php in /home/sapien13/public_html/c4cdemo/wp-content
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: Starting mail fetch
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: Postie Version: 1.8.12
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: WordPress Version: 4.5
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: PHP Version: 5.5.32
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: OS: Linux vps9377.inmotionhosting.com 2.6.32-042stab113.11 #1 SMP Thu Aug 11 09:41:14 MSK 2016 x86_64
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: POSTIE_DEBUG: On
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: Time: 2016-10-26 15:25:41 GMT
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: Error log: /home/sapien13/public_html/c4cdemo/wp-content/error_logs.txt
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: TMP dir: /tmp/
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: Postie is in /home/sapien13/public_html/c4cdemo/wp-content/plugins/postie/
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: cURL version: 7.38.0
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: Cron: On
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: Alternate Cron: Off
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: wp_content_path: /home/sapien13/public_html/c4cdemo/wp-content
[26-Oct-2016 15:25:41 US/Central] Postie [debug]: found filterPostie.php in /home/sapien13/public_html/c4cdemo/wp-content
-
This reply was modified 9 years, 6 months ago by
Brendanw7.
All Postie does after the “found filterPostie.php” message is do an include_once()
Try adding DebugEcho("end of filterPostie.php"); below add_filter() to see if it gets that far.
I am not sure what I changed to fix it, but it seems to be working now. Must have been my error somewhere. Thank you for your help!
Glad to hear you got it working.