Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $params = array(
- //REQUIRED, the id of the event that needs to be added to the cart
- 'event_id' => $event_id,
- //REQUIRED, Anchor of the link, can use text or image
- 'anchor' => '<img src="http://breakwaterschoolregistration.org/wp-content/uploads/2013/12/addtocartbutton.jpg" />',
- //REQUIRED, if not available at this point, use the next line before this array declaration
- // $event_name = get_event_field('event_name', EVENTS_DETAIL_TABLE, ' WHERE id = ' . $event_id);
- 'event_name' => $event_name,
- //OPTIONAL, will place this term before the link
- //'separator' => __(" ", 'event_espresso')
- 'direct_to_cart' => 1,
- );
- $cart_link = event_espresso_cart_link($params);
- echo isset($cart_link) ? $cart_link : '';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement