WP Job Manager Emails 2.1.0 Released! Custom post status, featured/unfeatured, [date] and [time] shortcodes, and more!

WP Job Manager Emails Custom Post Status Hooks

Today, version 2.1.0 of the WP Job Manager Emails plugin was released, which includes a few bug fixes, some enhancements, and some awesome new features!  Some of the new features include full support for custom post statuses, featured and un-featured email hooks, pending payment to pending approval email hook, [date] and [time] shortcodes, and more!  Below i’ll go over all of these new features, bug fixes, etc!

New Features

Custom Post Statuses

As you can see in the image on the right, version 2.1.0 now includes full support for custom post statuses on Job, Application, and Resume post types.  These hooks are dynamically generated based on your custom post statuses and will all show up under the Custom Post Status Action Hooks in the hook dropdown.   This is a major revamp of the post status handling as everything is dynamically generated now, based on custom and default statuses.

WP Job Manager Emails Custom Post Status Hooks

WP Job Manager Emails Custom Post Status Hooks

So as an example, if you added a custom status to Applications, we will call it Rejected, and for keeping things simple in this example, we will say the only default statuses are Interviewed and Hired (default are actually new, interviewed, offer, hired, and archived). The plugin will automatically generate every possible hook between your custom status, any other custom statuses, and the default statuses.

So in our example from above, the new dynamically generated hooks would be rejected_to_hired, rejected_to_interviewed, hired_to_rejected, and interviewed_to_rejected.

Basically it’s customstatus_to_defaultstatus and defaultstatus_to_customstatus.  If you have additional custom statuses, it will also generate customstatus_to_customstatus.

Featured and Un-Featured Hooks

WP Job Manager Emails Featured Un-Featured Hooks

WP Job Manager Emails Featured Un-Featured Hooks

New hooks were added to send emails when a listing is updated and set as a Featured listing from Un-Featured, as well as Un-Featured to Featured listing.

In the image to the left, you can see there is also an available configuration option that will show when you select a featured or un-featured hook from the dropdown, that will allow you to configure to send the email when the listing is initially created.


[date] and [time] Shortcodes

WP Job Manager Emails [date] shortcode custom format example

WP Job Manager Emails [date] shortcode custom format example

Two new shortcodes were also added, [date] and [time], to allow you to output the date or time that the email is sent.  By default the WordPress Date and Time format (from Settings > General) i used to format the output, but you can also very easily customize this.

To customize the format of the output, all you need to do is use the attribute format and then specify a PHP date format to use.

An example of this would be, [date format=”Y-m-d”] which would output in this format: 2017-04-21

The [date] and [time] shortcodes are “technically” doing the same exact thing, I added them both to make it easier for beginners, as if you wanted to, you could include the time format characters in the [date] shortcode (or vice versa) and it would output as you configured it.


Other Features

pending_payment_to_pending email hook and templates

I’ve also added in this release the new pending_payment_to_pending email hook.  This is very useful if you want to send an email after payment has been made on a listing, but is still requiring approval.

Email templates were also added for this hook, and it can be used on both Jobs and Resumes.

New claim created via Admin Area email hook

What’s Next?!

Along with all the new features that have been added, i’ve also started the work on expanding the [if] shortcode, which will soon allow you to extensively customize your email templates.  You will be able to add conditionals (AND,OR), as well as false statements, and some custom function handling.

Soon you will be able to add [if] shortcodes in your email templates, like these (just examples):

// AND conditional logic
[if job_salary AND candidate_available][/if]

// OR conditional logic
[if candidate_available OR candidate_sendall][/if]

// Has "Some Text" in the title somewhere
[if job_title contains('Some Text')][/if]

// Equals exactly
[if job_location equals('Orlando, FL')][/if]

// Greater than or equal to
[if job_salary GTE('50,000')][/if]

The expanded [if] shortcode handling is not available in this latest release, but it will be included in an upcoming release.

I’ve also started handling of core emails as well, which includes the New Account, Lost Password, and a few others, which will be included in the next release as well 🙂


Bug Fixes

This release includes a few minor bug fixes in the last release.  Related to the Claim Listing addon plugin, the admin email was not being sent when a new claim was created, and the hooks were somewhat confusing to users.  This release fixes that issue, and adds a new hook new_claim_created_admin_area that will only be fired when a new claim is created via the Admin area (will not send when created from frontend of site).  The two other Claim Listing email hooks I added “Frontend” to clarify in their description. When you have an email template enabled for one of these emails (frontend ones), it will override and replace the default email sent by the plugin.

The framework used for the dropdowns in the admin area, has also been updated to patch a bug with Internet Explorer 11 where the dropdown would reopen by itself, as well as a bug where there were instances where you may be unable to select a hook from the dropdown.

Code was also added to dequeue the sloppy Bootstrap 3 Shortcodes plugin that enqueues it’s JavaScript on all pages, which caused conflict with my plugin’s dropdowns and javascript.

Fixed a few PHP warnings, issue where using single quotes in the subject line would show the encoded value (') instead of the single quote (it would still send the email with single quote).

There was also an issue with the [listing_url] shortcode which was fixed as well.

1 Comment

  1. henryk May 9, 2017 at 6:34 am #

    Hi Myles that sounds good. Can you do some integration with woocommerce booking as well? Because the woocommerce booking mailing is very sad. An you have done some integration of woocommerce booking at the fielt editor. so hopefully you are fimilar with the code.
    thanks for all.

Leave a Reply