WP Dispensary editor with new default shortcode

WP Dispensary v2.6 Release Notes

WP Dispensary version 2.6 is officially out in the wild!

This release adds a brand new [wpd_menu] shortcode, plus a bunch of action hooks, helper functions and filters.

These updates in v2.6 will drastically change the way you use WP Dispensary, by making it 100X easier to use!

Needless to say…

WP Dispensary v2.6

I’ve been thinking a lot about the way WP Dispensary is used during day to day operations of your cannabis business, and how I can make those daily tasks easier for you to complete.

The first think I thought about was the install process.

When you activate WP Dispensary, it creates a new “Dispensary Menu” page and auto-includes the shortcodes for each menu type.

sounds good, right?

If you want to make adjustments to the menu display, you have to apply the same updates to each shortcode (example: category=”deals”).

Sure, copy/pasting only takes 20-30 seconds, but what about if you don’t just want to update categories, but also set the weight to show for prerolls, turn THC on for every menu type that has it, etc?

This is A LOT of work for 6 shortcodes (8 if you have Tinctures and Gear add-on’s installed) and those 20-30 seconds turned into 20-30 minutes.

New shortcode

I don’t want to require a lot of your time to get the basics in place after the plugin is activated, so that’s where the new shortcode comes in!

The old way

When WP Dispensary is installed & activated, there is a new “Dispensary Menu” page created, with the default shortcodes or each menu type added as content.

While this was a quick way to get you started after the install, it still left a lot of open ended questions, as you can see by the example screenshot below:

  • What if a user doesn’t understand what shortcodes actually are?
  • What options are available for each shortcode?
  • What do I do if I only want to show products from a “Deals” category?
WP Dispensary editor with all shortcodes added
click to enlarge

For a new user, this can be an intimidating screen and from a business standpoint, it doesn’t make WP Dispensary as easy to use as I want it to be, so it had to be changed.

The new way

That’s where the new default shortcode comes in!

WP Dispensary v2.6+ comes with a new default [wpd_menu] shortcode that outputs all menu types by default.

WP Dispensary editor with new default shortcode
click to enlarge

Using WP Dispensary just got 100X easier with this one simple upgrade!

The default wpd_menu shortcode has a list of accepted parameters, similar to the individual menu type shortcodes.

The full list of available parameters can be found in it’s article in our documentation.

These options make it easy to display products from each menu type that have been categorized as “Deals”.

Doing this is as simple as [wpd_menu category="deals"].

If you want to rearrange the menu types and only display items from specific menu types, that’s just as easy!

Just add this to your page and it’s done [wpd_menu type="flowers, prerolls, concentrates, tinctures, edibles"].

See … 100X easier!

New menu page

This release also changes how the menu page itself is set up when you install WP Dispensary.

Version 2.6+ will create a new page simply titled “MENU” with the [wpd_menu] default shortcode for content.

Again, as you can see in the below screenshot, this page is much easier to digest for new users.

“Dispensary” is also removed from the title, since not every WP Dispensary user is actually a dispensary (hello delivery services!).

WP Dispensary editor with new default shortcode
click to enlarge

New Helper Functions

There were a few helper functions created to help the new shortcode do everything it does.

Version 2.6 of WP Dispensary adds in 5 new helper functions.

  • get_wpd_product_details
  • wpd_product_details
  • get_wpd_product_image
  • wpd_product_image
  • get_wpd_all_prices_simple

You can see a full list of available functions and their file location by going to the helper functions article in our documentation.

New Filters

To keep the shortcode as customizable as possible, there are two new filters added in this release.

These both appear in the shortcode, giving you the ability to change shortcode arguments and menu types that are used in the WP_Query.

  • wpd_menu_shortcode_args
  • wpd_shortcode_menu_types

You can view a full list of available filters and their file location by going to the filters article in our documentation.

New Action Hooks

WP Dispensary v2.6 adds in two new action hooks, which both are in the new [wpd_menu] shortcode.

  • wpd_shortcode_menu_top
  • wpd_shortcode_menu_bottom

These action hooks are good for adding content into menu items within the loop, similar to how our Top Sellers add-on will display a trophy icon for your top selling products (see demo).

You can view a full list of available action hooks and their file location by going to the action hooks article in our documentation.

Widget updates

The widgets have been updated to include the new wpd_product_image function when displaying the product image.

That, along with some other minor code cleanup will help make maintaining WP Dispensary easier, which makes it easier to push out additional updates at a faster pace.

Download WP Dispensary

If you haven’t downloaded WP Dispensary yet, you can do it directly in your WordPress admin dashboard by going to Plugins -> Add New and searching for WP Dispensary.

If you already have WP Dispensary installed (thank you!), you will find the update notice in your admin dashboard.

Leave a Reply

Your email address will not be published. Required fields are marked *