WP Dispensary version 2.5 is out in the wild and packed with all kinds of awesome updates!
This blog post is going to cover the updates and new features in WP Dispensary v2.5, including the 30+ new helper functions and action hooks.
Let’s check out what’s new!
20 new helper functions
As WP Dispensary matures, the code base continues to be cleaned up and organized for easier customization.
Version 2.5 of WP Dispensary pushes the code base further ahead by updating various helper functions and also adding in 20 new helper functions.
These new helper functions are mainly focused on product prices and how to get those prices within the included shortcodes, data output and in add-on’s like the eCommerce extension.
The new helper functions included in WP Dispensary 2.5 are:
You can view a list of all WP Dispensary helper functions at this link.
12 new action hooks in widgets
Version 2.5 of WP Dispensary includes a dozen new action hooks, split up between each of the included widgets.
The newly included action hooks are:
You can view a list of all action hooks included in WP Dispensary at this link.
Updated Topicals metaboxes details
To better align the Topicals product type with the others provided in WP Dispensary (Edibles, Growers) and add-on’s (Gear, Tinctures), the Topicals metaboxes have been updated.
The topical price has been moved to it’s own Product Pricing box, along with the option to add
units per pack and
price per pack.
New ID option for shortcodes
Each of our shortcodes now include a new option for you to add an ID.
This can help if you have a long menu page and want to link to the anchor
#flowers to scroll your user down to the desired section.
Below is an example of the Flowers shortcode with an ID added to it.
Settings options updates
In version 2.5 of WP Dispensary, the settings page has been updated to hide the coupons option if the Coupons add-on isn’t activated.
There are also some updates to the
Display settings for your Compounds, and some settings that are only active if you have the eCommerce add-on installed.
Also, version 2.5 of WP Dispensary sets the
Currency Code to
USD by default.
New body class names for WPD pages
To help make it easier to target specific items on your website via CSS, we’ve added in body class names for various areas of your site where WP Dispensary related content is displayed.
For instance, if you’re on the
dispensary-menu page, there are two body classes added:
Each menu type archive (example: Flowers) also have two body classes added. Each get a
wp-dispensary body class and also and the menu type name prefixed with wpd- (example:
Download WP Dispensary v2.5
If you already have WP Dispensary installed, you’ll receive notification of the new release in your WordPress admin dashboard.
If you have not yet downloaded WP Dispensary, you can install it now via your WordPress admin dashboard by going to
Plugins -> Add New and searching for WP Dispensary.