From 9986b889546bb1359b708e3fa470888c99b0eda0 Mon Sep 17 00:00:00 2001 From: Bartosz Budzanowski Date: Thu, 30 Nov 2023 13:22:04 +0100 Subject: [PATCH 1/6] Update order attribution default cookie lifetime. --- .../src/Internal/Orders/OrderAttributionController.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php b/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php index 07df4ef4708..134690236c4 100644 --- a/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php +++ b/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php @@ -200,9 +200,12 @@ class OrderAttributionController implements RegisterHooksInterface { * * @since 8.5.0 * - * @param int $lifetime The lifetime of the cookie in months. + * @param float $lifetime The lifetime of the cookie in months. + * + * Fractional values are supported. + * The defualt value tricks sourcebuster into using cookie valid for session only. */ - $lifetime = (int) apply_filters( 'wc_order_attribution_cookie_lifetime_months', 6 ); + $lifetime = (float) apply_filters( 'wc_order_attribution_cookie_lifetime_months', 0.00001 ); /** * Filter the session length for source tracking. From e44514c9098d0313b31e08fa3d8bfcaef3a388c4 Mon Sep 17 00:00:00 2001 From: Bartosz Budzanowski Date: Thu, 30 Nov 2023 13:25:52 +0100 Subject: [PATCH 2/6] Add changelog file. --- .../changelog/update-order-attribution-session-length | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 plugins/woocommerce/changelog/update-order-attribution-session-length diff --git a/plugins/woocommerce/changelog/update-order-attribution-session-length b/plugins/woocommerce/changelog/update-order-attribution-session-length new file mode 100644 index 00000000000..13c6ba2729b --- /dev/null +++ b/plugins/woocommerce/changelog/update-order-attribution-session-length @@ -0,0 +1,4 @@ +Significance: minor +Type: tweak + +Change the default cookie lifetime from 6 months to the lenght of the session. From 137661a6d2a23606326cc6feb111136ebdd13b0c Mon Sep 17 00:00:00 2001 From: Bartosz Budzanowski Date: Thu, 30 Nov 2023 15:35:30 +0100 Subject: [PATCH 3/6] Update plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com> --- .../src/Internal/Orders/OrderAttributionController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php b/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php index 134690236c4..bc8dc23ecb6 100644 --- a/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php +++ b/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php @@ -200,7 +200,7 @@ class OrderAttributionController implements RegisterHooksInterface { * * @since 8.5.0 * - * @param float $lifetime The lifetime of the cookie in months. + * @param float $lifetime The lifetime of the Sourcebuster cookies in months. * * Fractional values are supported. * The defualt value tricks sourcebuster into using cookie valid for session only. From 8cc1fb863ee692f8041cafcc77d9d340b06b7a7b Mon Sep 17 00:00:00 2001 From: Bartosz Budzanowski Date: Thu, 30 Nov 2023 15:35:40 +0100 Subject: [PATCH 4/6] Update plugins/woocommerce/changelog/update-order-attribution-session-length Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com> --- .../changelog/update-order-attribution-session-length | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce/changelog/update-order-attribution-session-length b/plugins/woocommerce/changelog/update-order-attribution-session-length index 13c6ba2729b..fd185e767f0 100644 --- a/plugins/woocommerce/changelog/update-order-attribution-session-length +++ b/plugins/woocommerce/changelog/update-order-attribution-session-length @@ -1,4 +1,4 @@ Significance: minor Type: tweak -Change the default cookie lifetime from 6 months to the lenght of the session. +Change the default cookie lifetime from 6 months to the length of the session. From 48f60670fc9961cdb0f0befbc36845b577b75edd Mon Sep 17 00:00:00 2001 From: Bartosz Budzanowski Date: Thu, 30 Nov 2023 15:37:33 +0100 Subject: [PATCH 5/6] Update plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com> --- .../src/Internal/Orders/OrderAttributionController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php b/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php index bc8dc23ecb6..f51e1cc8a81 100644 --- a/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php +++ b/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php @@ -203,7 +203,7 @@ class OrderAttributionController implements RegisterHooksInterface { * @param float $lifetime The lifetime of the Sourcebuster cookies in months. * * Fractional values are supported. - * The defualt value tricks sourcebuster into using cookie valid for session only. + * The default value forces Sourcebuster into making the cookies valid for the current session only. */ $lifetime = (float) apply_filters( 'wc_order_attribution_cookie_lifetime_months', 0.00001 ); From ea51e4ee85c57f090e1c0489c9dd3f0560570b6a Mon Sep 17 00:00:00 2001 From: Bartosz Budzanowski Date: Thu, 30 Nov 2023 15:46:09 +0100 Subject: [PATCH 6/6] Remove mention of fractions. --- .../src/Internal/Orders/OrderAttributionController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php b/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php index f51e1cc8a81..90f9b63f419 100644 --- a/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php +++ b/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php @@ -202,7 +202,6 @@ class OrderAttributionController implements RegisterHooksInterface { * * @param float $lifetime The lifetime of the Sourcebuster cookies in months. * - * Fractional values are supported. * The default value forces Sourcebuster into making the cookies valid for the current session only. */ $lifetime = (float) apply_filters( 'wc_order_attribution_cookie_lifetime_months', 0.00001 );