Tribe__Tickets__Commerce__Currency::get_provider_symbol( mixed $provider, int $object_id = null )

Returns the currency symbol depending on the provider.


Parameters

$provider

(mixed) (Required) The ticket provider class name or object.

$object_id

(int) (Optional) The post ID

Default value: null


Top ↑

Return

(string)


Top ↑

Source

File: src/Tribe/Commerce/Currency.php

	public function get_provider_symbol( $provider, $object_id = null ) {
		if ( ! class_exists( $provider ) ) {
			return $this->get_currency_symbol( $object_id );
		}

		if ( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' === $provider && function_exists( 'get_woocommerce_currency_symbol' ) ) {
			return get_woocommerce_currency_symbol();
		}

		if ( 'Tribe__Tickets_Plus__Commerce__EDD__Main' === $provider && function_exists( 'edd_currency_symbol' ) ) {
			return edd_currency_symbol();
		}

		if ( tribe( 'tickets.commerce.paypal' )->is_active() ) {
			return $this->get_currency_symbol( $object_id );
		}

		return tribe_get_option( 'defaultCurrencySymbol', '$' );

	}

Top ↑

Changelog

Changelog
Version Description
4.7 Introduced.