Hooks::filter_showing_cart_button( array $args )
Hide the ‘save and view cart` button from AR Modal depending on Cart type.
Contents
Parameters
- $args
-
(array) (Required) Context arraay for the modal template.
Return
(array)
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;
}
Changelog
| Version | Description |
|---|---|
| 5.2.0 | Introduced. |