Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_price_html( int|object $product, array|boolean $attendee = false )

Get’s the WC product price html


Parameters

$product

(int|object) (Required)

$attendee

(array|boolean) (Optional)

Default value: false


Top ↑

Return

(string)


Top ↑

Source

File: src/Tribe/Commerce/WooCommerce/Main.php

	public function get_price_html( $product, $attendee = false ) {
		if ( is_numeric( $product ) ) {
			if ( class_exists( 'WC_Product_Simple' ) ) {
				$product = new WC_Product_Simple( $product );
			} else {
				$product = new WC_Product( $product );
			}
		}

		if ( ! method_exists( $product, 'get_price_html' ) ) {
			return '';
		}

		$price_html = $product->get_price_html();

		/**
		 * Allow filtering of the Price HTML
		 *
		 * @since 4.3.2
		 *
		 * @param string $price_html
		 * @param mixed  $product
		 * @param mixed  $attendee
		 *
		 */
		return apply_filters( 'tribe_events_wootickets_ticket_price_html', $price_html, $product, $attendee );
	}