Tribe__Tickets_Plus__Commerce__WooCommerce__Main::hijack_ticket_link( $post_link,  $post,  $unused_leavename,  $unused_sample )

Replaces the link to the WC product with a link to the Event in the order confirmation page.


Parameters

$post_link

(Required)

$post

(Required)

$unused_leavename

(Required)

$unused_sample

(Required)


Top ↑

Return

(string)


Top ↑

Source

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

	public function hijack_ticket_link( $post_link, $post, $unused_leavename, $unused_sample ) {
		if ( $post->post_type === 'product' ) {
			$event = get_post_meta( $post->ID, $this->event_key, true );
			if ( ! empty( $event ) ) {
				$post_link = get_permalink( $event );
			}
		}

		return $post_link;
	}