Hooks::filter_return_to_cart( string $html, string $file, string $name, Tribe__Template $et_template )

Filters the return-to-cart template to replace with Return to Checkout instead.


Parameters #

$html

(string) (Required) The HTML to render.

$file

(string) (Required) Template file.

$name

(string) (Required) Template name.

$et_template

(Tribe__Template) (Required) Template object.


Top ↑

Return #

(string)


Top ↑

Source #

File: src/Tickets_Plus/Commerce/Attendee_Registration/Hooks.php

	public function filter_return_to_cart( $html, $file, $name, $et_template ) {
		$provider = $et_template->get( 'provider' );
		if ( ! $provider instanceof Module ) {
			return $html;
		}

		/** @var \Tribe__Tickets_Plus__Template $template */
		$template = tribe( 'tickets-plus.template' );

		$url = $provider->get_checkout_url();
		$url = add_query_arg( Cart::$cookie_query_arg, tribe_get_request_var( Cart::$cookie_query_arg ), $url );

		$args                 = $et_template->get_local_values();
		$args['checkout_url'] = $url;

		return $template->template( 'v2/attendee-registration/mini-cart/footer', $args, false );
	}

Top ↑

Changelog #

Changelog
Version Description
5.3.0 Introduced.