Created
February 4, 2014 21:36
-
-
Save joshfeck/8812820 to your computer and use it in GitHub Desktop.
Adds an "Add to cart" link onto the single event registration page. Requires Event Espresso and its Multi Event Registration add-on.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('action_hook_espresso_social_display_buttons', 'single_custom_cart_link'); | |
function single_custom_cart_link($event_id) { | |
global $wpdb; | |
$event_name = $wpdb->get_var("SELECT event_name FROM " . EVENTS_DETAIL_TABLE . " WHERE id='" . $event_id . "'"); | |
?><div class="custom-cart-link" style="display:block;"> | |
<?php echo do_shortcode('[ESPRESSO_CART_LINK event_id="'.$event_id.'" event_name="'.$event_name.'" anchor="Add this session to your cart"]'); ?> | |
</div> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment