wc_order_attribution_cookie_lifetime_months
Filter the lifetime of the cookie used for source tracking.
Использование
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.
Список изменений
С версии 8.5.0 | Введена. |
Где вызывается хук
wc_order_attribution_cookie_lifetime_months
woocommerce/src/Internal/Orders/OrderAttributionController.php 285
$lifetime = (float) apply_filters( 'wc_order_attribution_cookie_lifetime_months', 0.00001 );