| @@ -608,8 +608,24 @@ | ||
| 608 | 608 | return (string) $this->section_value( 'general', 'tracking_consent' ); |
| 609 | 609 | } |
| 610 | 610 | |
| 611 | 611 | /** |
| 612 | + * The PERSISTED tracking consent, ignoring the settings read filter. | |
| 613 | + * | |
| 614 | + * Use this — never `tracking_consent()` — to decide whether data may be | |
| 615 | + * sent off-site. See General_Section::raw_tracking_consent(). | |
| 616 | + */ | |
| 617 | + public function raw_tracking_consent(): string { | |
| 618 | + $section = $this->sections()->get( 'general' ); | |
| 619 | + | |
| 620 | + if ( $section instanceof General_Section ) { | |
| 621 | + return $section->raw_tracking_consent(); | |
| 622 | + } | |
| 623 | + | |
| 624 | + return ''; | |
| 625 | + } | |
| 626 | + | |
| 627 | + /** | |
| 612 | 628 | * Whether the JWT may be passed as a query parameter (Tools). |
| 613 | 629 | */ |
| 614 | 630 | public function use_jwt_as_param_enabled(): bool { |
| 615 | 631 | return (bool) $this->section_value( 'tools', 'use_jwt_as_param' ); |