woocommerce-cart-stock-reducer
woocommerce-cart-stock-reducer copied to clipboard
Add option to display countdown only on cart/checkout page
Requested by user https://wordpress.org/support/topic/custom-some-features/
If it can help you, I have done it for a client. Just add a checkbox in plugin settings, then :
In includes/class-woocomerce-cart-stock-reducer.php :
Add :
// Define user set variables. $this->show_in_product_pages = $this->get_option( 'expire_countdown' ); if ($this->show_in_product_pages) { add_action( 'woocommerce_check_cart_items', array( $this, 'check_cart_items' ), 9 ); add_action( 'woocommerce_before_shop_loop', array( $this, 'check_cart_items' ), 9 ); }