Tribe__Tickets__REST__V1__Endpoints__QR::has_api( array $qr_arr )
Check if API is present and matches key is settings
Contents
Parameters
- $qr_arr
-
(array) (Required) Array of QR data.
Return
(bool)
Source
File: src/Tribe/REST/V1/Endpoints/QR.php
public function has_api( $qr_arr ): bool {
if ( empty( $qr_arr['api_key'] ) ) {
return false;
}
$tec_options = Tribe__Settings_Manager::get_options();
if ( ! is_array( $tec_options ) ) {
return false;
}
if ( esc_attr( $qr_arr['api_key'] ) !== $tec_options['tickets-plus-qr-options-api-key'] ) {
return false;
}
return true;
}
Changelog
| Version | Description |
|---|---|
| 5.7.0 | Introduced. |