Plugin Stopped sending emails after update
-
Your plugin stopped working and sending emails after update (I have downgraded to 1.7.2).
The page I need help with: [log in to see the link]
-
Hi @bigshow,
Thanks for your message.I hven’t had any other reports of this – can you confirm you’re using WordPress 5.2?
Can you also tell me if you’re using an SMTP plugin or not?Yes I use WP5.2
and Post SMTPWhen a user creates a a post from acf front end its not sending( non admin )
Hi @bigshow,
Ah, in that case, if you’re using ACF, you may want to look at these two support document:
https://betternotificationsforwp.com/documentation/how-to-trigger-a-notification-from-an-acf-front-end-form/https://betternotificationsforwp.com/documentation/compatibility/support-plugins-front-end-forms/
Let me know if either of these help.
and how did it worked without it?
Hi @bigshow,
Couldn’t say to be sure – it’s possible a recent update to ACF has caused a problem but it’s difficult to say exactly.Please see how you get on with the above and let me know.
I’ll try to use the link you provided on the acf even i didnt used it before.
Sorry, But its not working.
It’s not sending emails-
This reply was modified 7 years ago by
Igor Ilgiyaev.
Hi @bigshow,
Thanks – your reply wasn’t clear: have you used the code linked to above to see if it triggers notifications? I’ve used this on a few sites now and it’s worked great.Do emails show in the Email Log from Post SMTP?
I do have the SMTP plugin and the Emails Log is not showing that an email was sent.
This is the code that I use to send emails
and it works great on 1.7.2
If you need access I will send you through the Priority Supportacf_form(array(
‘post_id’ => ‘new_post’,
‘post_title’ => false,
‘post_content’ => false,
‘new_post’ => array(
‘post_type’ => ‘vacation_place’,
‘post_status’ => ‘publish’
),
‘return’ => ‘https://www.gig-jockey.com/travel-sent’,
‘submit_value’ => ‘Send’
));$current_user_id = get_current_user_id();
$current_user_country = get_user_meta( $current_user_id, ‘user_country’, true);
?>
<span style=”display:none;” data-current-user-country=”<?php echo $current_user_country; ?>”></span>
<script>
jQuery(function( $ ) {
var current_user_country = $(“span[data-current-user-country]”).data(‘current-user-country’);
var country_field = $(‘#acf-field_5929c1718c65c’);$(‘#acf-form’).on(‘submit’, function() {
$(‘.country-err-msg’).remove();
if(country_field.val() === current_user_country) {
country_field.after(‘<div class=”acf-error-message country-err-msg”><p>You can not choose your own country</p></div>’);
return false;
}
});
});
</script>Hi @bigshow,
Thanks but did you use the updated code provided in my previous reply? To clairfy, you have to transition a post from another post status to publish before it will trigger the notification. Recent changes to both BNFW and ACF require this so you will most likely need to update your code to make it compatible.yes I did tried it and the post is published but not sent
I think I know the problem
$bnfw = BNFW::factory();
remove_action( ‘pending_submissions’, array( $bnfw, ‘on_post_pending’ ), 10, 2);This code is cancels the action of sending and it changes it to pending.
What I need is that after a user submits it will send automatically.From the last code I FALSE the title and content and use only acf fields and inside the function page I created a code that adds the acf field called “title” to the post title after submit.
-
This reply was modified 7 years ago by
Igor Ilgiyaev.
Hi @bigshow,
It should send automatically providing that you save the post as pending and then transition the post status from pending to publish using theacf/save_postaction. You have to transition the post betweetn two statuses for BNFW to recognise that a post has been added to the site. This is what WordPress does and is why BNFW works in the WP Admin, so you have to essentially replicate this when using another way of publishing, such as using an ACF form. Hope that makes sense.Is this what you’re doing?
It make sense.
So how it is working in 1.7.2 like I showed you earlier?
I immediately publish the post and it sent out as supposed to be. -
This reply was modified 7 years ago by
The topic ‘Plugin Stopped sending emails after update’ is closed to new replies.