Title: samnait's Replies | WordPress.org

---

# samnait

  [  ](https://wordpress.org/support/users/samnait/)

 *   [Profile](https://wordpress.org/support/users/samnait/)
 *   [Topics Started](https://wordpress.org/support/users/samnait/topics/)
 *   [Replies Created](https://wordpress.org/support/users/samnait/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/samnait/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/samnait/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/samnait/engagements/)
 *   [Favorites](https://wordpress.org/support/users/samnait/favorites/)

 Search replies:

## Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce Cart Stock Reducer] selected date and time to expire](https://wordpress.org/support/topic/selected-date-and-time-to-expire/)
 *  Thread Starter [samnait](https://wordpress.org/support/users/samnait/)
 * (@samnait)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/selected-date-and-time-to-expire/#post-11106489)
 * FLAWLESS! It worked! Thank you, Thank you.
 * It gave me another 24 hours after it expired where before it would not let you
   reorder when it expired.
    So just to recap. And I think someone would find this
   plugin very useful. 1. it clears all the sessions in the cart that has been abandoned.
   2. it will do it daily at a specified time you set and hide notification if you
   chose. 3. combined with the link that I found on GitHub, it will identify which
   category you want this applied to so not all products will expire. 4. It’s automated.
   I have searched everywhere and nobody has this not even close. They can only 
   hide or expire products but it will not clear the carts in a certain category
   specified and put back in inventory with or without variables. On your next update
   for this should be implemented.
 * Thanks again James
    ==== add_filter(‘wc_csr_expire_time’, ‘jmg_expire_time’, 
   10, 5); function jmg_expire_time( $time, $expire_time_text, $item, $key, $csr){
   $now = time(); if ($now > strtotime(’22:45:00′)) { $time = strtotime(‘tomorrow
   22:45:00′); } else { $time = strtotime(’22:45:00’); } return $time;
 * }
    -  This reply was modified 7 years, 6 months ago by [samnait](https://wordpress.org/support/users/samnait/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce Cart Stock Reducer] selected date and time to expire](https://wordpress.org/support/topic/selected-date-and-time-to-expire/)
 *  Thread Starter [samnait](https://wordpress.org/support/users/samnait/)
 * (@samnait)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/selected-date-and-time-to-expire/#post-11105859)
 * Thank you for taking the time to do this. I will test right away and get back
   to you!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce Cart Stock Reducer] selected date and time to expire](https://wordpress.org/support/topic/selected-date-and-time-to-expire/)
 *  Thread Starter [samnait](https://wordpress.org/support/users/samnait/)
 * (@samnait)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/selected-date-and-time-to-expire/#post-11103038)
 * hmm I worked on this for 4 hours and can’t get it at all.
    If you find a solution
   let me know. I’ll keep checking back.
 * Thanks anyways.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce Cart Stock Reducer] selected date and time to expire](https://wordpress.org/support/topic/selected-date-and-time-to-expire/)
 *  Thread Starter [samnait](https://wordpress.org/support/users/samnait/)
 * (@samnait)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/selected-date-and-time-to-expire/#post-11101827)
 * Okay found it and that did the trick.
    I don’t get the logic on the time to expire
   settings though. So this time… it is 12:50 PM system time so I set the backend
   as 23:00:00 It says you have 3 hours and 9 minutes and sec. based on this sample
   do you know what the calculations be to have it expire at 11 pm? (what I would
   set the settings to have it expire at 11pm instead of 23:00:00)?
 * Thanks again
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce Cart Stock Reducer] selected date and time to expire](https://wordpress.org/support/topic/selected-date-and-time-to-expire/)
 *  Thread Starter [samnait](https://wordpress.org/support/users/samnait/)
 * (@samnait)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/selected-date-and-time-to-expire/#post-11098631)
 * Wow thank you so much! It worked 🙂
    One last thing, because I already have a
   custom notification that says “if you don’t check out before 11 pm, you will 
   lose the items in your cart” How would I remove Please check out within… time
   count down? Thanks again.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce Cart Stock Reducer] selected date and time to expire](https://wordpress.org/support/topic/selected-date-and-time-to-expire/)
 *  Thread Starter [samnait](https://wordpress.org/support/users/samnait/)
 * (@samnait)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/selected-date-and-time-to-expire/#post-11094126)
 * hmmm I guess I’m a bit confused. How would I do this?
    I wanted to modify the
   one that you have now. where and how I would edit this? So just to be clear. 
   If customer A added an item in the cart at 10:20pm And customer B added an item
   in the cart at 10:30pm Both customers will have no items in their cart at 11pm
   because it will be put back in the inventory. And wanted this to happen every
   day to trigger at 11pm
 * Thanks a bunch.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce Cart Stock Reducer] Product Category](https://wordpress.org/support/topic/product-category-9/)
 *  Thread Starter [samnait](https://wordpress.org/support/users/samnait/)
 * (@samnait)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/product-category-9/#post-11058444)
 * This was accomplished by doing this solution.
    [https://stackoverflow.com/questions/54033207/hide-remove-item-from-cart-for-woocommerce-product-category](https://stackoverflow.com/questions/54033207/hide-remove-item-from-cart-for-woocommerce-product-category)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce Cart Stock Reducer] Product Category](https://wordpress.org/support/topic/product-category-9/)
 *  Thread Starter [samnait](https://wordpress.org/support/users/samnait/)
 * (@samnait)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/product-category-9/#post-11050512)
 * Thanks for replying 🙂
    It would be awesome to have to trigger only the ones 
   with a certain category setup for a product. The reason for this is because if
   you only wanted to have “specials” category to be timed then it gets released
   from your cart if not purchased within a certain time. If you could help in what
   to change in the code that would be great. If it could be placed in a child theme
   as a function would be awesome.

Viewing 8 replies - 1 through 8 (of 8 total)