wc_order_attribution_session_length_minutes
Filter the session length for source tracking.
Usage
add_filter( 'wc_order_attribution_session_length_minutes', 'wp_kama_wc_order_attribution_session_length_minutes_filter' ); /** * Function for `wc_order_attribution_session_length_minutes` filter-hook. * * @param int $session_length The session length in minutes. * * @return int */ function wp_kama_wc_order_attribution_session_length_minutes_filter( $session_length ){ // filter... return $session_length; }
- $session_length(int)
- The session length in minutes.
Changelog
Since 8.5.0 | Introduced. |
Where the hook is called
wc_order_attribution_session_length_minutes
woocommerce/src/Internal/Orders/OrderAttributionController.php 295
$session_length = (int) apply_filters( 'wc_order_attribution_session_length_minutes', 30 );