Update order attribution default cookie lifetime. (#41806)
This commit is contained in:
commit
f271f9fea4
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: tweak
|
||||||
|
|
||||||
|
Change the default cookie lifetime from 6 months to the length of the session.
|
|
@ -200,9 +200,11 @@ class OrderAttributionController implements RegisterHooksInterface {
|
||||||
*
|
*
|
||||||
* @since 8.5.0
|
* @since 8.5.0
|
||||||
*
|
*
|
||||||
* @param int $lifetime The lifetime of the cookie in months.
|
* @param float $lifetime The lifetime of the Sourcebuster cookies in months.
|
||||||
|
*
|
||||||
|
* The default value forces Sourcebuster into making the cookies valid for the current 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.
|
* Filter the session length for source tracking.
|
||||||
|
|
Loading…
Reference in New Issue