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