Filter
rpress_use_cart_cookie
On this page
Filters whether the items-in-cart cookie is used.
Applied in RPRESS_Session::use_cart_cookie(). The default is true unless the RPRESS_USE_CART_COOKIE constant is defined as false. The result is cast to bool. The cookie helps page caches serve the correct cart state.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$use_cookie | bool | Whether the cart cookie is used. |
Return value#
bool. True to use the cart cookie.
Example#
function my_use_cart_cookie( $use_cookie ) {
return $use_cookie;
}
add_filter( 'rpress_use_cart_cookie', 'my_use_cart_cookie' );
Source#
Applied in:
includes/class-rpress-session.php(line 263), inRPRESS_Session::use_cart_cookie()
See also#
Was this page helpful?
