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
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?
php wordpress woocommerce cart
marked as duplicate by LoicTheAztec
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.
add a comment |
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?
php wordpress woocommerce cart
marked as duplicate by LoicTheAztec
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
add a comment |
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?
php wordpress woocommerce cart
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
php wordpress woocommerce cart
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
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
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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.
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
|
show 4 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
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
|
show 4 more comments
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.
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
|
show 4 more comments
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.
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.
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
|
show 4 more comments
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
|
show 4 more comments
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