Skip to content

Instantly share code, notes, and snippets.

View sanzeeb3's full-sized avatar
🚩
You are here!

Sanzeeb Aryal sanzeeb3

🚩
You are here!
View GitHub Profile
<?php
/**
* Plugin Name: Plugin Name
* Description: Creating plugin settings with React JS.
* Version: 1.0.0
* Author: Sanjeev Aryal
* Author URI: https://www.sanjeebaryal.com.np
* Text Domain: simplicity
* Domain Path: /languages/
*
@sanzeeb3
sanzeeb3 / attach-files-from-wpforms.php
Last active April 15, 2022 06:18
Attach files from WPForms file upload field directly to an email
add_filter( 'wpforms_emails_send_email_data', 'wpf_prepare_files', 10, 2 );
/**
* Prepare file attachment.
*
* @param Array $data Email Data.
* @param Obj $email_obj Email Object.
*
* @return Obj The Email Data with attachment.
*/