Tribe__Tickets_Plus__Commerce__EDD__Main::get_price_html( int|object $product, array|boolean $attendee = false )
Get’s the product price html
Contents
Parameters
- $product
-
(int|object) (Required)
- $attendee
-
(array|boolean) (Optional)
Default value: false
Return
(string)
Source
File: src/Tribe/Commerce/EDD/Main.php
public function get_price_html( $product, $attendee = false ) {
if ( ! tribe_tickets_is_edd_active() ) {
return;
}
$product_id = $product;
// Avoid Catchable Fatal on EDD for using product_id as a possible string
if ( $product instanceof WP_Post || $product instanceof EDD_Download ) {
$product_id = $product->ID;
}
$price_html = edd_price( $product_id, false );
/**
* Allows filtering of the HTML that renders an EDD ticket price.
*
* @param string $price_html The HTML of the EDD ticket price.
* @param WP_Post|EDD_Download $product The WP_Post or EDD_Download object of the "ticket" product.
* @param array|boolean $attendee Defaults to false. Could be an array of attendee information.
*/
return apply_filters( 'eddtickets_ticket_price_html', $price_html, $product, $attendee );
}