wpcf7_mail_tag_replaced error
-
Hello,
I was trying to modify the tag replacements for emails. The problem is that the acceptance-tag also includes sometimes the complete label text.
So I created a function to replace the label text with nothing, to only have the basic output.
There is no error message but the email is not send. Did anyone have some suggestions why this is not working?
When I try to only use one string ($replaced = str_replace('string 1', '', $replaced) it is working as excpected.
This is my code:add_filter('wpcf7_mail_tag_replaced',
function ($replaced, $submitted, $html, $mail_tag) {
/*
$searchArr = [
'string 1',
string 2',
.....
];
*/
return str_replace($searchArr, '', $replaced);
},
10, 4
);
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.