Tribe__Tickets__Commerce__PayPal__Gateway::get_product_name( Tribe__Tickets__Ticket_Object $ticket, WP_Post $post )

Gets the full PayPal product name


Parameters

$ticket

(Tribe__Tickets__Ticket_Object) (Required) Ticket whose name is being generated

$post

(WP_Post) (Required) Post that the tickets are attached to


Top ↑

Return

(string)


Top ↑

Source

File: src/Tribe/Commerce/PayPal/Gateway.php

	public function get_product_name( $ticket, $post ) {
		$title = get_the_title( $post->ID );
		$name  = $ticket->name;

		$product_name = "{$name} - {$title}";

		/**
		 * Filters the product name for PayPal's cart
		 *
		 * @since 4.7
		 *
		 * @param string $product_name
		 * @param Tribe__Tickets__Ticket_Object
		 */
		return apply_filters( 'tribe_tickets_commerce_paypal_product_name', $product_name, $ticket );
	}

Top ↑

Changelog

Changelog
Version Description
4.7 Introduced.