swte

disable cache clearing on stock change

Jun 22nd, 2021
1,174
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Plugin Name: Swift Performance Tweaks
  3.  */
  4.  
  5. add_action('init', function(){
  6.     remove_action('woocommerce_product_set_stock', array('Swift_Performance_Cache', 'clear_post_cache'));
  7.     remove_action('woocommerce_variation_set_stock', array('Swift_Performance_Cache', 'clear_post_cache'));
  8. });
RAW Paste Data