Add your selected dispensary location(s) to shortcode output

This is a code snippet that utilizes the Dispensary Locations add-on and displays the selected location(s) for each menu item through the included WP Dispensary action hook. If you have multiple dispensaries or only deliver specific menu items to specific cities, you can utilize this code to display the location name that also links your […]

Add “View Details” button to shortcode output

The following code will add a View Details button to the bottom of each item displayed via the shortcodes, similar to how the WooConnect add-on adds view details and buy now buttons. <?php /** * WP Dispensary – view details button */ add_action( 'wpd_shortcode_inside_bottom', 'acme_viewdetails' ); function acme_viewdetails() { ?> <p><a href="<?php the_permalink(); ?>" class="acme-button">View […]

Display your edibles total THC mg per unit

<? /** * By default, WP Dispensary has options for dispensary owners * to add in THC mg per serving and serving count to each edible added. * * The below code snippet finds the THC mg and Servings numbers, multiplies * them together and then spits out the total THC mg per unit */ […]

Remove “In Stock” message from the Inventory Management add-on

<?php /** Removes the Inventory Management add-on's front end display of available inventory */ add_action( 'wpd_dataoutput_bottom', 'remove_wpd_inventory_data', 1 ); function remove_wpd_inventory_data() { remove_action( 'wpd_dataoutput_bottom', 'add_wpd_inventory_data_flowers' ); remove_action( 'wpd_dataoutput_bottom', 'add_wpd_inventory_data_concentrates' ); remove_action( 'wpd_dataoutput_bottom', 'add_wpd_inventory_data_edibles' ); remove_action( 'wpd_dataoutput_bottom', 'add_wpd_inventory_data_prerolls' ); remove_action( 'wpd_dataoutput_bottom', 'add_wpd_inventory_data_topicals' ); remove_action( 'wpd_dataoutput_bottom', 'add_wpd_inventory_data_growers' ); } view raw wp-dispensary-inventory-management-remove-actions.php hosted with ❤ by GitHub