WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Notify On Action

This plugin allows Admins to set up email notification on any action performed in any of functions on themes/plugins.

How to Use it

Ways to use this plugin: * Send Standard Notification - Create a new Notification Type in the form below (i.e Notification Name is "SaluteMyFriend") - Add this code in the Theme/Plugin function when you want the notification to be submitted:

 if (has_action("noa_notify_on_action")){                       
    do_action( "noa_notify_on_action","SaluteMyFriend", $args);
    }
   

Once the do_action executes, an email notification will be send with the information on the "SaluteMyFriend" Notification Type

    * Send Notification with Application Specific Data
  You can also submit arguments to be sent in your email. For example, lets say you would like your email template to include application specific information which varies depending on where the user clicks, then you can pass that argument into the do_action function.                        
 - Create a new Notification Type in the form below (i.e Notification Name is "SaluteMyFriend")
- Wherever you want application specific data to be in the email, create a %xxxx% tag. (i.e In Message text box include %arg1%, %arg2%)
<pre>
 if (has_action("noa_notify_on_action")){
    $args = array("arg1" => "Good Morning",
          "arg2"=> "Joe Doh"                    
    );

    do_action( "noa_notify_on_action","SaluteMyFriend", $args);
}
   </pre>

In the Notification Type you the tags %arg1%, %arg2% to substitute the values sent. The name of the tag (i.e arg needs to match in the template and in the $args variable.

The name of these arguments need to match between the Notification Type template and the argument sent by the application. For example, if you write in the message of your Notification type "The price of %product% is %price%", then your code will look like this:
<pre>
if (has_action("noa_notify_on_action")){
    $args = array("product" => "Computer",
        "price"=> "$850.99"                             );

    do_action( "noa_notify_on_action","ProductConfirmation", $args);
}
</pre>


You can use these %args% only in the Body of the message.

* Send Notification to Application Specific Recipients</h3>

If the recipient needs to be specified by the application, use the keyword "recipients" in the arguments array. 
    if (has_action("noa_notify_on_action")){
         $args = array(                                      "recipients" => array("john@gmail.com","giulia@yahoo.com"),
                             "product" => "Computer",
                             "price"=> "$850.99"                    
                            );

                     do_action( "noa_notify_on_action","ProductConfirmation", $args);
                    }
                    </pre>

This will send the Notification Type template to John and Giulia\'s emails.

Requires: 3.1 or higher
Compatible up to: 3.2.1
Last Updated: 2011-9-25
Downloads: 796

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1