Hooks::filter_showing_cart_button( array $args )

Hide the ‘save and view cart` button from AR Modal depending on Cart type.


Parameters

$args

(array) (Required) Context arraay for the modal template.


Top ↑

Return

(array)


Top ↑

Source

File: src/Tickets/Commerce/Hooks.php

	public function filter_showing_cart_button( $args ) {
		if ( ! isset( $args['has_tpp'] ) || ! isset( $args['provider'] ) ) {
			return $args;
		}

		if ( Module::class !== $args['provider']->class_name ) {
			return $args;
		}

		$args['has_tpp'] = 'redirect' === $this->container->make( Cart::class )->get_mode();

		return $args;
	}

Top ↑

Changelog

Changelog
Version Description
5.2.0 Introduced.