{"id":72173,"date":"2017-07-29T11:35:02","date_gmt":"2017-07-29T11:35:02","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/egrapes-wp-emails-events\/"},"modified":"2017-07-29T11:35:02","modified_gmt":"2017-07-29T11:35:02","slug":"egrapes-wp-emails-events","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/egrapes-wp-emails-events\/","author":13824606,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.0","stable_tag":"trunk","tested":"4.8.28","requires":"4.0","requires_php":"","requires_plugins":"","header_name":"eGrapes WP EMails Events","header_author":"Neeraj Mourya","header_description":"A Plugin or framework for developers to add events to send customised email messages. This also adds a user interface in wordpress's settings\/options menu in wp admin to customise each event's email message. Subject and message text can be edited from user interface. Events can be added by filter ewee_events.","assets_banners_color":"","last_updated":"2017-07-29 11:35:02","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.egrapes.in\/","header_plugin_uri":"http:\/\/www.egrapes.in\/projects\/php\/wordpress\/plugins\/egrapes-wp-emails-events\/","header_author_uri":"http:\/\/neerajmourya.tumblr.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1092,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"Email customization user interface in dashboard's settings options."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[144485,2483],"plugin_category":[41],"plugin_contributors":[144486],"plugin_business_model":[],"class_list":["post-72173","plugin","type-plugin","status-publish","hentry","plugin_tags-custom-emails","plugin_tags-emails","plugin_category-communication","plugin_contributors-neerajmourya","plugin_committers-neerajmourya"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/egrapes-wp-emails-events.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>A Plugin or framework to add events to send customised email messages.\nThis also adds a user interface in wordpress's settings\/options menu in wp admin to customise each event's email message. \nSubject and message text can be edited from user interface. Events can be added by filter ewee_events.<\/p>\n\n<ul>\n<li>This plugin does not provide any functionality alone. This can be requirement of other plugins and themes, as developer can use this as framework.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins\/plugin-name<\/code> directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins\/plugin-name<\/code> directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress.<\/li>\n<\/ol><\/dd>\n<dt>How to create an event group?<\/dt>\n<dd><p>Write the code in your theme's functions.php or your custom plugin's file.<\/p>\n\n<p>add_filter('ewee_events_groups', 'custom_events_groups', 10, 1); \/\/adding mail events groups\nfunction custom_events_groups($events_groups){\n    $events_groups['products'] = 'Products';\n    return $events_groups;\n}<\/p><\/dd>\n<dt>How to create an event?<\/dt>\n<dd><p>Write the code in your theme's functions.php or your custom plugin's file.<\/p>\n\n<p>add_filter('ewee_events', 'custom_mail_events', 10, 1); \/\/adding mail events\nfunction custom_mail_events($events){\n    $events['order_created'] = array(\n        'name' =&gt; 'Order Created', \/\/Name of the event.\n        'description' =&gt; 'When order created.', \/\/Description of the event.\n        'send' =&gt; true, \/\/Whether to use this event to send mail or not.\n        'subject' =&gt; 'Order %orderno% Created.', \/\/Subject of the message. can be modified from wp admin dashboard. Use token keys wrapped by %.\n        'message' =&gt; 'An Order with Order No. %orderno% has been created.', \/\/Message. can be modified from wp admin dashboard. Use token keys wrapped by %.\n        'tokens' =&gt; array('orderno'), \/\/Define tokens.\n        'group' =&gt; 'products', \/\/Event group.\n    );\n    return $events;\n}<\/p><\/dd>\n<dt>How to trigger the event?<\/dt>\n<dd><p>Write the code in your theme's functions.php or your custom plugin's file when you want to send specific email.<\/p>\n\n<p>Use send_mail method of EGrapesWPEmailsEvents class.<\/p>\n\n<p>public function send_mail($event_key, $tokens = array(), $to, $headers = '', $attachments = array())<\/p>\n\n<p>e.g.,<\/p>\n\n<p>$eGrapesWPEmailsEvents = EGrapesWPEmailsEvents::get_instance(); \/\/Get the object of class EGrapesWPEmailsEvents.\n$eGrapesWPEmailsEvents-&gt;send_mail('order_created', array('orderno' =&gt; 'abc987'), 'abc@gmail.com'); \/\/call the method send_mail.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Emails Events<\/li>\n<li>Emails Events groups.<\/li>\n<li>Emails customization user interface for specific events.<\/li>\n<\/ul>","raw_excerpt":"A Plugin or framework for developers to add events to send customised email messages.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/72173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=72173"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/neerajmourya"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=72173"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=72173"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=72173"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=72173"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=72173"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=72173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}