/* show flip countdown timer in product archive / loop - works only with https://wpgenie.org/product/flip-countdown-timer-for-woocommerce-lottery/ WooCommerce Lottery addon! */ add_action( 'woocommerce_after_shop_loop_item_title','wpgenie_show_counter_in_loop_flip', 51 ); function wpgenie_show_counter_in_loop_flip(){ global $product; $time = ''; if(!isset ($product)) return; if('lottery' != $product->get_type()) return; if(!$product->is_started()){ $timetext = __('Starting in', 'wc_lottery'); $counter_time = $product->get_seconds_to_lottery(); } else{ $counter_time = $product->get_seconds_remaining(); } if ( ( $product->is_closed() === FALSE ) && ($product->is_started() === TRUE ) ) : ?>