Using add_action
I am able to add a function to the plugin.
// add action to after_record_action
add_action('after_record_action', 'marian_rick_custom_action', 10, 3);
// add function
function marian_rick_custom_action ($result, $data, $format){
// get data from $data[] array
$email = $data['email'];
$key = $data['key'];
// use $data to create a personalized mail
$to = $email;
$subject = "Wordpress Test";
$content = "Hi, this us your key:" . $key . "Enjoy using it!";
// send mail using wp_mail
$status = wp_mail($to, $subject, $content);
}
Related Posts:
- Get the ID of the page a menu item links to?
- Add container to nav_menu sub menu
- Does hooking into the same action multiple times drain memory?
- Different wp_mail_from and wp_mail_from_name for specific situations
- register_post_type for Pages?
- Paged Single Post doesn’t redirect to the main url after Removing Pagination
- is_front_page not working in functions.php
- VERY new to coding – keep breaking site trying to add to functions.php
- Restrict user registration to emails on a single domain
- Call to undefined add_action() in theme’s functions.php
- How can I rename the WordPress AJAX URL? [duplicate]
- How to add a rel attribute to images that contains their categories?
- Is it possible to be more page/post specific with admin_enqueue_script?
- How to enqueue JavaScript for specific WordPress pages only?
- Passing HTML in WordPress Shortcode arguments
- Can I use require() function in a template file?
- What is the most efficient method for loading widgets in functions.php
- Enqueue script o style only if a template part is loaded
- Exclude Empty Child Categories in Menu
- Can I pass two roles to the function get_users?
- Convert User ID’s to User Names in a single.php file
- Add external js file to footer with id
- password protected post policy
- Custom Shortcode, functions PHP WP_Query loop
- wpautop – disable tags, keep tags
- Logout hyperlink within a sub-menu
- Manipulate Permalink
- Change the HTML of the comment form that is generating somewhere from the core WordPress
- Translation of theme using child theme
- Display post shortcode content in the sidebar?
- How to use wp_trash_post (or wp_delete_post) for deleting a (or all) post(s) from custom post type?
- change the url paths in the stylesheet dynamically
- Create post using Ajax
- Usage of theme name in functions
- Dumping variable in custom pre_gets_post function in functions.php, returns NULL
- Load jquery only for certain pages in the backend
- How to load parent theme template parts in child theme
- allow only one post in specific category
- ACF not showing
- Cannot modify header information – headers already sent (wp_redirect in functions.php)
- Javascript function not working when placed in Text Block
- Use html inside shortcode function
- How to remove comment count column in Posts inside the admin dashboard?
- Cannot declare function twice [closed]
- Running script based on Category
- Get array of metakey in all posts
- How do I hook into the container of wp_nav_menu?
- Unable to return values from function
- Function not working inside of a function in functions.php
- How to Use Global Variables Inside Header and Footer
- Redirect website domain (including all pages) to external URL after Popup message (few seconds)
- Where do I go to edit this area? [closed]
- processing form data with ajax
- Check from functions.php if function exists in footer.php
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- Email Exists ERROR into Ajax registration form
- How to convert raw url to hyperlink?
- Split single-review.php to two parts
- get content from page through AJAX
- Limit number of characters in different excerpts
- The work of WordPress Function update_post
- Facebook OpenGraph error, Call to undefined function wp_get_attachment_src()
- How to avoid saving empty data to sql while using add_meta_box
- how can I change all wordpress media file url to custom cdn url?
- How to fix Function create_function() is deprecated in / themes
- Block all plug-ins from initiating redirection upon activation?
- Changing the HTML of notices in WooCommerce [closed]
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- How Can I Create a Friendly Slug for a Dynamic Page?
- custom error message for empty username and password using authenticate filter not working
- I have an fatal error on my funcyions.php
- function class doesnt work
- get_locale() is different from $locale
- Load CSS file conditionally
- my wordpress doesn’t save items to customized widget area
- Remove all video attachment, both files and post/postmeta from database?
- save_post doesn’t correctly process function call with php class
- Custom download page
- How to include a hyperlink in the body text of a custom password protected form?
- Get title from IDs in a string
- How to a override parent theme page that has been included with require_once?
- Display most popular posts
- Dynamically generated Navigation Diagram using Custom Fields
- Update add_image_size
- Excerpt length: get 2 paragraphs
- Remove heading tags on line break
- Function to get the name in database table from the comma separated string
- Full size image option removing problem
- Add custom fields after post/page title
- Ajax call does not work for this custom code
- Force resize for all video content
- Way of getting queried loop before the query with a filter hook?
- Sort results by name & asc order on homepage
- Add the title of a widget as an ID – for anchor links
- Why my wp_enqueue_script doesnt work on some page?
- I want to add the alt attribute to all the photos!
- Need to use an external variable inside a function
- Correct php syntax to add an image in wp functions.php
- Customizer cuistom CSS Priority ordre Issue
- WPDB query suddenly not working