wc_order_attribution_cookie_lifetime_months filter-hookWC 8.5.0

Filter the lifetime of the cookie used for source tracking.

Usage

add_filter( 'wc_order_attribution_cookie_lifetime_months', 'wp_kama_wc_order_attribution_cookie_lifetime_months_filter' );

/**
 * Function for `wc_order_attribution_cookie_lifetime_months` filter-hook.
 * 
 * @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.
 *
 * @return float
 */
function wp_kama_wc_order_attribution_cookie_lifetime_months_filter( $lifetime ){

	// filter...
	return $lifetime;
}
$lifetime(float)
The lifetime of the Sourcebuster cookies in months.

The default value forces Sourcebuster into making the cookies valid for the current session only.

Changelog

Since 8.5.0 Introduced.

Where the hook is called

OrderAttributionController::enqueue_scripts_and_styles()
wc_order_attribution_cookie_lifetime_months
woocommerce/src/Internal/Orders/OrderAttributionController.php 286
$lifetime = (float) apply_filters( 'wc_order_attribution_cookie_lifetime_months', 0.00001 );

Where the hook is used in WooCommerce

Usage not found.