Ticket::get_price_value( int|WP_Post $product, bool $force_regular = false )

Gets the product price value object


Parameters

$product

(int|WP_Post) (Required) The ticket post ID or object.

$force_regular

(bool) (Optional) Whether to force the regular price.

Default value: false


Top ↑

Return

(TECTicketsCommerceCommerceUtilsValue;)


Top ↑

Source

File: src/Tickets/Commerce/Ticket.php

	public function get_price_value( $product ) {
		$product = get_post( $product );

		if ( ! $product instanceof \WP_Post ) {
			return false;
		}

		return get_post_meta( $product->ID, static::$price_meta_key, true );
	}

Top ↑

Changelog

Changelog
Version Description
5.13.0 added new param to force regular price value return.
5.1.9 Introduced.