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

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?