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

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현