skip to Main Content

Php – WordPress. Contact Form 7. How to add several attachments in email using code?

Trying to add attachments to the letter. add_action('wpcf7_before_send_mail', 'custom_attach_files_to_email'); function custom_attach_files_to_email($contact_form) { $submission = WPCF7_Submission::get_instance(); if ($submission) { $uploaded_files = $submission->uploaded_files(); $attachments = array(); foreach ($uploaded_files as $uploaded_file) { $attachments[] = $uploaded_file; } $attachments[] = WP_CONTENT_DIR . '/uploads/files/file.txt'; //$attachments[] =…

VIEW QUESTION

WordPress CF7 custom validation

I am new to wordpress php and have a question regarding custom contact form 7 validation. I have the code below and wish to add this to return the error msg if not selected. function add_shortcode_metalspurityradio() { wpcf7_add_shortcode( 'goldkarat', 'metalspurityradio_handler',…

VIEW QUESTION
Back To Top
Search