woocommerce-cart-stock-reducer icon indicating copy to clipboard operation
woocommerce-cart-stock-reducer copied to clipboard

Add option to display countdown only on cart/checkout page

Open jamesgol opened this issue 6 years ago • 1 comments

Requested by user https://wordpress.org/support/topic/custom-some-features/

jamesgol avatar Dec 07 '17 16:12 jamesgol

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 ); }

hzengler avatar Dec 17 '18 15:12 hzengler