How to disable or remove persistent cart in Woocommerce? [duplicate]Save cart on the current sessionWoocommerce Disable Persistent Cart for Specific UserHow can I prevent SQL injection in PHP?PHP and EnumerationsWooCommerce, Add to cart not working, and cart page not displayingWoocommerce get carts of all userWoocommerce Set Cart Expiration IntervalWoocommerce Disable Persistent Cart for Specific UserRemove a specific cart item when adding to cart a specific product in WoocommerceDisable shopping when an item from a specific product category is in cart in WoocommerceDisable cart page but keep the checkout page in WoocommerceRemove add to cart button if the product is in cart on Woocommerce

Why was the shrink from 8″ made only to 5.25″ and not smaller (4″ or less)

How can saying a song's name be a copyright violation?

GFCI outlets - can they be repaired? Are they really needed at the end of a circuit?

Machine learning testing data

Where would I need my direct neural interface to be implanted?

OP Amp not amplifying audio signal

Car headlights in a world without electricity

Why is the sentence "Das ist eine Nase" correct?

One verb to replace 'be a member of' a club

What Exploit Are These User Agents Trying to Use?

How exploitable/balanced is this homebrew spell: Spell Permanency?

What is the most common color to indicate the input-field is disabled?

How do I exit BASH while loop using modulus operator?

How to install cross-compiler on Ubuntu 18.04?

How to enclose theorems and definition in rectangles?

Was the old ablative pronoun "med" or "mēd"?

Placement of More Information/Help Icon button for Radio Buttons

Is it possible to create a QR code using text?

How to prevent "they're falling in love" trope

files created then deleted at every second in tmp directory

Knowledge-based authentication using Domain-driven Design in C#

Was the Stack Exchange "Happy April Fools" page fitting with the '90's code?

Can someone clarify Hamming's notion of important problems in relation to modern academia?

Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?



How to disable or remove persistent cart in Woocommerce? [duplicate]


Save cart on the current sessionWoocommerce Disable Persistent Cart for Specific UserHow can I prevent SQL injection in PHP?PHP and EnumerationsWooCommerce, Add to cart not working, and cart page not displayingWoocommerce get carts of all userWoocommerce Set Cart Expiration IntervalWoocommerce Disable Persistent Cart for Specific UserRemove a specific cart item when adding to cart a specific product in WoocommerceDisable shopping when an item from a specific product category is in cart in WoocommerceDisable cart page but keep the checkout page in WoocommerceRemove add to cart button if the product is in cart on Woocommerce













2
















This question already has an answer here:



  • Woocommerce Disable Persistent Cart for Specific User

    3 answers



  • Save cart on the current session

    2 answers



I am currently using 3.5.7 version of WC. But I cannot find a way to disable the persistent cart feature of Woocommerce.



Can anyone give me a solution for my issue?










share|improve this question















marked as duplicate by LoicTheAztec woocommerce
Users with the  woocommerce badge can single-handedly close woocommerce questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Mar 21 at 21:02


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • How can we improve WooCommerce? Persistent cart

    – LoicTheAztec
    Mar 21 at 21:05











  • The answer posted are not working in the new version of wc.

    – Suri Lane
    Mar 21 at 21:21











  • The filter that has been created specifically on Woocommerce 3.4 does work. Anyways you need to search first and to give in your question the code attempts that you have tried, with some context and explanations. I kindly remember you that stackOverFlow is not a free coding service.

    – LoicTheAztec
    Mar 21 at 21:49
















2
















This question already has an answer here:



  • Woocommerce Disable Persistent Cart for Specific User

    3 answers



  • Save cart on the current session

    2 answers



I am currently using 3.5.7 version of WC. But I cannot find a way to disable the persistent cart feature of Woocommerce.



Can anyone give me a solution for my issue?










share|improve this question















marked as duplicate by LoicTheAztec woocommerce
Users with the  woocommerce badge can single-handedly close woocommerce questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Mar 21 at 21:02


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • How can we improve WooCommerce? Persistent cart

    – LoicTheAztec
    Mar 21 at 21:05











  • The answer posted are not working in the new version of wc.

    – Suri Lane
    Mar 21 at 21:21











  • The filter that has been created specifically on Woocommerce 3.4 does work. Anyways you need to search first and to give in your question the code attempts that you have tried, with some context and explanations. I kindly remember you that stackOverFlow is not a free coding service.

    – LoicTheAztec
    Mar 21 at 21:49














2












2








2









This question already has an answer here:



  • Woocommerce Disable Persistent Cart for Specific User

    3 answers



  • Save cart on the current session

    2 answers



I am currently using 3.5.7 version of WC. But I cannot find a way to disable the persistent cart feature of Woocommerce.



Can anyone give me a solution for my issue?










share|improve this question

















This question already has an answer here:



  • Woocommerce Disable Persistent Cart for Specific User

    3 answers



  • Save cart on the current session

    2 answers



I am currently using 3.5.7 version of WC. But I cannot find a way to disable the persistent cart feature of Woocommerce.



Can anyone give me a solution for my issue?





This question already has an answer here:



  • Woocommerce Disable Persistent Cart for Specific User

    3 answers



  • Save cart on the current session

    2 answers







php wordpress woocommerce cart






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 21 at 21:07









LoicTheAztec

95.8k1371113




95.8k1371113










asked Mar 21 at 20:35









Suri LaneSuri Lane

112




112




marked as duplicate by LoicTheAztec woocommerce
Users with the  woocommerce badge can single-handedly close woocommerce questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Mar 21 at 21:02


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by LoicTheAztec woocommerce
Users with the  woocommerce badge can single-handedly close woocommerce questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Mar 21 at 21:02


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • How can we improve WooCommerce? Persistent cart

    – LoicTheAztec
    Mar 21 at 21:05











  • The answer posted are not working in the new version of wc.

    – Suri Lane
    Mar 21 at 21:21











  • The filter that has been created specifically on Woocommerce 3.4 does work. Anyways you need to search first and to give in your question the code attempts that you have tried, with some context and explanations. I kindly remember you that stackOverFlow is not a free coding service.

    – LoicTheAztec
    Mar 21 at 21:49


















  • How can we improve WooCommerce? Persistent cart

    – LoicTheAztec
    Mar 21 at 21:05











  • The answer posted are not working in the new version of wc.

    – Suri Lane
    Mar 21 at 21:21











  • The filter that has been created specifically on Woocommerce 3.4 does work. Anyways you need to search first and to give in your question the code attempts that you have tried, with some context and explanations. I kindly remember you that stackOverFlow is not a free coding service.

    – LoicTheAztec
    Mar 21 at 21:49

















How can we improve WooCommerce? Persistent cart

– LoicTheAztec
Mar 21 at 21:05





How can we improve WooCommerce? Persistent cart

– LoicTheAztec
Mar 21 at 21:05













The answer posted are not working in the new version of wc.

– Suri Lane
Mar 21 at 21:21





The answer posted are not working in the new version of wc.

– Suri Lane
Mar 21 at 21:21













The filter that has been created specifically on Woocommerce 3.4 does work. Anyways you need to search first and to give in your question the code attempts that you have tried, with some context and explanations. I kindly remember you that stackOverFlow is not a free coding service.

– LoicTheAztec
Mar 21 at 21:49






The filter that has been created specifically on Woocommerce 3.4 does work. Anyways you need to search first and to give in your question the code attempts that you have tried, with some context and explanations. I kindly remember you that stackOverFlow is not a free coding service.

– LoicTheAztec
Mar 21 at 21:49













1 Answer
1






active

oldest

votes


















0














Try this out:



add_action( 'woocommerce_cart_updated', 'delete_persistent_cart' );
function delete_persistent_cart()
if ( get_current_user_id() )
$wc = WooCommerce::instance();
$wc->cart->persistent_cart_destroy();




This goes into your child themes function.php file and disables the persistent cart.






share|improve this answer

























  • I already tried that but it does not at work. after i put that code in my function-child.php, i cleared my browser cache but the issue still there.

    – Suri Lane
    Mar 21 at 20:46











  • Have you select your child theme as theme?

    – Mr. Jo
    Mar 21 at 20:47











  • I double check it and it yes. child is my theme.

    – Suri Lane
    Mar 21 at 20:49











  • @SuriLane Okay so we'll try another way. Please check it on your page and let me know if it does what you want.

    – Mr. Jo
    Mar 21 at 20:52











  • My site does not load after i put that code. It says "This page isn't working"

    – Suri Lane
    Mar 21 at 20:58

















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Try this out:



add_action( 'woocommerce_cart_updated', 'delete_persistent_cart' );
function delete_persistent_cart()
if ( get_current_user_id() )
$wc = WooCommerce::instance();
$wc->cart->persistent_cart_destroy();




This goes into your child themes function.php file and disables the persistent cart.






share|improve this answer

























  • I already tried that but it does not at work. after i put that code in my function-child.php, i cleared my browser cache but the issue still there.

    – Suri Lane
    Mar 21 at 20:46











  • Have you select your child theme as theme?

    – Mr. Jo
    Mar 21 at 20:47











  • I double check it and it yes. child is my theme.

    – Suri Lane
    Mar 21 at 20:49











  • @SuriLane Okay so we'll try another way. Please check it on your page and let me know if it does what you want.

    – Mr. Jo
    Mar 21 at 20:52











  • My site does not load after i put that code. It says "This page isn't working"

    – Suri Lane
    Mar 21 at 20:58















0














Try this out:



add_action( 'woocommerce_cart_updated', 'delete_persistent_cart' );
function delete_persistent_cart()
if ( get_current_user_id() )
$wc = WooCommerce::instance();
$wc->cart->persistent_cart_destroy();




This goes into your child themes function.php file and disables the persistent cart.






share|improve this answer

























  • I already tried that but it does not at work. after i put that code in my function-child.php, i cleared my browser cache but the issue still there.

    – Suri Lane
    Mar 21 at 20:46











  • Have you select your child theme as theme?

    – Mr. Jo
    Mar 21 at 20:47











  • I double check it and it yes. child is my theme.

    – Suri Lane
    Mar 21 at 20:49











  • @SuriLane Okay so we'll try another way. Please check it on your page and let me know if it does what you want.

    – Mr. Jo
    Mar 21 at 20:52











  • My site does not load after i put that code. It says "This page isn't working"

    – Suri Lane
    Mar 21 at 20:58













0












0








0







Try this out:



add_action( 'woocommerce_cart_updated', 'delete_persistent_cart' );
function delete_persistent_cart()
if ( get_current_user_id() )
$wc = WooCommerce::instance();
$wc->cart->persistent_cart_destroy();




This goes into your child themes function.php file and disables the persistent cart.






share|improve this answer















Try this out:



add_action( 'woocommerce_cart_updated', 'delete_persistent_cart' );
function delete_persistent_cart()
if ( get_current_user_id() )
$wc = WooCommerce::instance();
$wc->cart->persistent_cart_destroy();




This goes into your child themes function.php file and disables the persistent cart.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 21 at 20:59

























answered Mar 21 at 20:41









Mr. JoMr. Jo

946319




946319












  • I already tried that but it does not at work. after i put that code in my function-child.php, i cleared my browser cache but the issue still there.

    – Suri Lane
    Mar 21 at 20:46











  • Have you select your child theme as theme?

    – Mr. Jo
    Mar 21 at 20:47











  • I double check it and it yes. child is my theme.

    – Suri Lane
    Mar 21 at 20:49











  • @SuriLane Okay so we'll try another way. Please check it on your page and let me know if it does what you want.

    – Mr. Jo
    Mar 21 at 20:52











  • My site does not load after i put that code. It says "This page isn't working"

    – Suri Lane
    Mar 21 at 20:58

















  • I already tried that but it does not at work. after i put that code in my function-child.php, i cleared my browser cache but the issue still there.

    – Suri Lane
    Mar 21 at 20:46











  • Have you select your child theme as theme?

    – Mr. Jo
    Mar 21 at 20:47











  • I double check it and it yes. child is my theme.

    – Suri Lane
    Mar 21 at 20:49











  • @SuriLane Okay so we'll try another way. Please check it on your page and let me know if it does what you want.

    – Mr. Jo
    Mar 21 at 20:52











  • My site does not load after i put that code. It says "This page isn't working"

    – Suri Lane
    Mar 21 at 20:58
















I already tried that but it does not at work. after i put that code in my function-child.php, i cleared my browser cache but the issue still there.

– Suri Lane
Mar 21 at 20:46





I already tried that but it does not at work. after i put that code in my function-child.php, i cleared my browser cache but the issue still there.

– Suri Lane
Mar 21 at 20:46













Have you select your child theme as theme?

– Mr. Jo
Mar 21 at 20:47





Have you select your child theme as theme?

– Mr. Jo
Mar 21 at 20:47













I double check it and it yes. child is my theme.

– Suri Lane
Mar 21 at 20:49





I double check it and it yes. child is my theme.

– Suri Lane
Mar 21 at 20:49













@SuriLane Okay so we'll try another way. Please check it on your page and let me know if it does what you want.

– Mr. Jo
Mar 21 at 20:52





@SuriLane Okay so we'll try another way. Please check it on your page and let me know if it does what you want.

– Mr. Jo
Mar 21 at 20:52













My site does not load after i put that code. It says "This page isn't working"

– Suri Lane
Mar 21 at 20:58





My site does not load after i put that code. It says "This page isn't working"

– Suri Lane
Mar 21 at 20:58





Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript