Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /** Adds a new version of the In Stock message for each menu type */
- add_action( 'wpd_dataoutput_bottom', 'add_wpd_inventory_data', 10 );
- function add_wpd_inventory_data() { ?>
- <?php if ( ! get_post_meta( get_the_ID(), '_inventory_flowers', true ) ) { } else { ?>
- <tr><td><span>In stock:</span></td><td>YES</td></tr>
- <?php } ?>
- <?php if ( ! get_post_meta( get_the_ID(), '_inventory_concentrates', true ) ) { } else { ?>
- <tr><td><span>In stock:</span></td><td>YES</td></tr>
- <?php } ?>
- <?php if ( ! get_post_meta( get_the_ID(), '_inventory_edibles', true ) ) { } else { ?>
- <tr><td><span>In stock:</span></td><td>YES</td></tr>
- <?php } ?>
- <?php if ( ! get_post_meta( get_the_ID(), '_inventory_prerolls', true ) ) { } else { ?>
- <tr><td><span>In stock:</span></td><td>YES</td></tr>
- <?php } ?>
- <?php if ( ! get_post_meta( get_the_ID(), '_inventory_topicals', true ) ) { } else { ?>
- <tr><td><span>In stock:</span></td><td>YES</td></tr>
- <?php } ?>
- <?php if ( ! get_post_meta( get_the_ID(), '_inventory_clones', true ) ) { } else { ?>
- <tr><td><span>In stock:</span></td><td>YES</td></tr>
- <?php } ?>
- <?php if ( ! get_post_meta( get_the_ID(), '_inventory_seeds', true ) ) { } else { ?>
- <tr><td><span>In stock:</span></td><td>YES</td></tr>
- <?php } ?>
- <?php }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement