Tribe__Tickets_Plus__Commerce__WooCommerce__Meta::set_hash_cookie( string $transient_id, array $ticket_meta, null|string $provider )
Set hash value in the WooCommerce session.
Contents
Parameters
- $transient_id
-
(string) (Required) Transient ID.
- $ticket_meta
-
(array) (Required) List of ticket meta being saved.
- $provider
-
(null|string) (Required) Provider name.
Source
File: src/Tribe/Commerce/WooCommerce/Meta.php
public function set_hash_cookie( $transient_id, $ticket_meta, $provider ) {
if ( empty( $_POST['wootickets_process'] ) && ! in_array( $provider, [ 'woo', 'tribe_wooticket' ], true ) ) {
return;
}
$wc_session = WC()->session;
if ( empty( $wc_session ) ) {
return;
}
$wc_session->set( Tribe__Tickets_Plus__Meta__Storage::HASH_COOKIE_KEY, $transient_id );
}
Changelog
| Version | Description |
|---|---|
| 4.11.0 | Introduced. |