Home Forums WoodMart support forum Change woodmart cookie runtime/storage duration

Change woodmart cookie runtime/storage duration

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #400640

    Silence
    Participant

    Hello!

    When a guest adds an item to the wish list on our website, two cookies are stored for this purpose in the browser for 7 days.

    We would like to change the duration of the following two cookies for privacy reasons. Both cookies should be deleted automatically when the browser is closed. They are to be treated as session cookies.

    • woodmart_wishlist_count:”id”
    • woodmart_wishlist_products:”id”

    Question:
    What code do I need to add to functions.php to change the runtime or storage duration of the two cookies?

    Thanks for your effort!

    Best regards

    #400864

    Hello,

    Unfortunately, there is no option. You can add this custom code to the functions.php of the child theme:

    if ( ! function_exists( 'woodmart_update_session_expiration' ) ) {
    	function woodmart_update_session_expiration() {
    		return DAY_IN_SECONDS;
    	}
    
    	add_filter( 'woodmart_session_expiration', 'woodmart_update_session_expiration' );
    }

    If you have any questions please feel free to contact us.

    Best Regards

    #702711

    Vladislav
    Participant

    Hello. If you do the opposite, you can make a wishlist last for 3 months.

    #704188

    Vladislav
    Participant

    ???

    #704229

    Artem Temos
    Keymaster

    Hello @Vladislav,

    Could you please clarify your question? What exactly would you like to achieve?

    Kind Regards

    #704416

    Vladislav
    Participant

    When a guest adds an item to their wishlist, it stays there for as long as possible

    #704421

    Artem Temos
    Keymaster

    Hello,

    Currently, there is no filter to change this for guest visitors. We will add an option for this in our next theme update.

    Kind Regards

Viewing 7 posts - 1 through 7 (of 7 total)