Tagged: remove_my_attachment
- This topic has 4 replies, 2 voices, and was last updated 6 years, 8 months ago by Stephen.
-
AuthorPosts
-
StephenGuest
Hello,
I can’t get your plugin to activate. It gives me a fatal error:
Fatal error: Cannot redeclare remove_my_attachment() (previously declared in /home/stephen1/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(517) : eval()’d code:2) in /home/stephen1/public_html/wp-content/plugins/formidablepro-2-pdf/fpropdf.php on line 2727
Can you offer any advice? Thank you.
adminKeymasterLooks like there is a function with a duplicate name “remove_my_attachment” in your one of your code-snippets. Try searching for the duplicate code in your snippets and rename all instances of the function to “remove_my_attachment1”.
Let us know the result as we remain at your service.
StephenGuestHere’s the code snippet I’m using – BUT it’s a Formidable Forms filter so I can’t change it…… looks like you’re both using the same code function and it’s clashing. So I can’t use your plugin.
add_filter(‘frm_notification_attachment’, ‘remove_my_attachment’, 10, 3);
function remove_my_attachment($attachments, $form, $args) {
if ( $args[’email_key’] == 4240 ) { //change 1277 to the email ID that you would like to DROP the attachment for
$attachments = array(); //remove all attachments
}
return $attachments;
}adminKeymasterWe have posted an update to the plugin which avoids this conflict. Update or reinstall the plugin to realize the change.
Thank you for letting us know about the issue. We remain at your service.
StephenGuestWow. That’s great! Impressive work – thank you!
-
AuthorPosts