test programmer
Forum Replies Created
-
AuthorPosts
-
test programmerParticipantThis reply has been marked as private.test programmerParticipant
I’ve tried to do
update_post_meta( $announcement_id, '_fep_email_sent', time() );
in the action fep_save_announcement but it still got send.test programmerParticipantThe save function is not like this?
add_action( 'fep_save_message', 'before_save_message', 100, 3 ); function before_save_message( $message_id, $message, $update ){ }
test programmerParticipantI also don’t want to show an error, I want to prevent email sending. How can I do that?
test programmerParticipantI’m using version 8.4.1. I’m trying to add an announcement in the backend. How can I make sure the checkboxes are added?
test programmerParticipantHi Matt,
Any solution? I have the same problem.
Thanks.
test programmerParticipantHi Shamim,
I didn’t change site… still working on the same. Also i didn’t use the license for another site…test programmerParticipantI’ve tried to change the interval a couple of times but with no result. The event still doesn’t show in the overview.
Then I tried to reinstall the plugin. After installation the event was shown in the overview. But after applying my settings (that were set before reinstalling) the event is no longer shown in overview.
What could be the cause of this? Is it an option you take a look in the backoffice?
test programmerParticipant1. I’ve installed the WP Crontrol plugin. In the WP-Cron Schedules overview I see the following. There is the fep_ann_email_interval schedule that should run every minute. In the overview of Cron events that you can see here, I don’t see any events related to sending announcement emails.
2. Template is selected, subject is filled in, content not (because of template).
3. Done.
4. Done
5. Server logs are not showing any errors. Also, wordpress logging is not logging anything.
6. Addeddefine( 'ALTERNATE_WP_CRON', true );
to wp-config.php but no change.It’s really strange, you have any other ideas?
Attachments:You must be logged in to view attached files.test programmerParticipantI’ve set my interval at 1 minute.
I first tried to send announcements with the setting “Send an e-mail to all users when a new message is place” turned on. When I create an announcement, no mails are sent to the receivers. Also, in the overview of messages it shows “emails sent – 0/2”.
when I switch the setting off then in the overview it shows “emails sent – “2/2”. But I still don’t receive emails.
What could be the problem here? (I’ve always waited more than 1 minutes before checking)
test programmerParticipantI’ve tried this:
add_filter( 'fep_filter_before_email_send', 'change_email_subject', 10, 3 ); function change_email_subject($content, $post, $user_email) { $current_language = apply_filters( 'wpml_current_language', NULL ); $language = get_user_meta( fep_get_userdata( $user_email, 'ID', 'email'), 'icl_admin_language', true ); // set language of user do_action( 'wpml_switch_language', $language ); $subject = ""; if($post->post_type == "fep_message") { $subject = sprintf( __('ZOUTE GRAND PRIX®: New message', 'zoute_theme' )); } $content['subject'] = $subject; do_action( 'wpml_switch_language', $current_language ); return $content; }
When I try to dump the $content before returning it, the subject is changed correctly. The content of the message itself not (but is changed afterwards with template in /emails folder).
But when I receive the email, the subject is not changed. It’s overwritten by the subject configured in backoffice.
Why doesn’t it work?
test programmerParticipantThank you! Works perfect! Do you also know how I can change the subject of the mail? So it’s translated?
test programmerParticipantI now have the following:
add_filter( 'fep_eb_email_legends', 'fep_cus_fep_email_legends', 10, 3); function fep_cus_fep_email_legends( $legends, $post, $user_email ){ $user = get_user_by( 'email', $user_email ); $language = get_user_meta( (int)$user->ID, 'icl_admin_language', true ); $legends['receiver_language'] = array( 'description' => __('Receiver language', 'front-end-pm'), 'where' => array( 'newmessage', 'reply', 'announcement' ), //where this tag will be used 'replace_with' => $language ); return $legends; } add_filter( 'fep_eb_templates', 'fep_cus_fep_eb_templates', 10, 2 ); function fep_cus_fep_eb_templates( $templates, $where ) { $templates['new_message'] = 'Nieuw bericht'; return $templates; }
In my template I have the language by the added field receiver_language.
But how can I use this in my template in an if structure?
Is this the way I should do this?
test programmerParticipantThis reply has been marked as private.test programmerParticipantThis reply has been marked as private. -
AuthorPosts