PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.18
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.18
1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 All 163 releases
← All changes | includes/Services/Lifecycle_Events.php +7 -3 1.10.41.10.18 View file →
@@ -342,9 +342,11 @@
342 342 if ( ! Analytics::instance()->is_enabled() ) {
343 343 // A queued event outlives an undecided answer. Once the answer is
344 344 // no, drop it rather than leaving it to sit in the options table
345 345 // waiting for a consent that is not coming.
346 - if ( 'denied' === Settings::instance()->tracking_consent() ) {
346 + // The persisted answer: a settings filter must not be able to keep a
347 + // declined merchant's queued events sitting in the options table.
348 + if ( 'denied' === Settings::instance()->raw_tracking_consent() ) {
347 349 delete_option( self::PENDING_OPTION );
348 350 }
349 351
350 352 return;
@@ -491,10 +493,12 @@
491 493 * @param string $event Event name.
492 494 * @param array $properties Event properties.
493 495 */
494 496 private function record( string $event, array $properties = array() ): void {
495 - // An explicit "no" is an answer, not a delay.
496 - if ( 'denied' === Settings::instance()->tracking_consent() ) {
497 + // An explicit "no" is an answer, not a delay. Read the persisted value:
498 + // nothing should be queued about a merchant who declined, even if a
499 + // settings filter presents a different answer.
500 + if ( 'denied' === Settings::instance()->raw_tracking_consent() ) {
497 501 return;
498 502 }
499 503
500 504 $pending = get_option( self::PENDING_OPTION );