Hi @xbhy,
The countdown timer is displayed only on the product detail page in the Ultimate Auction for WooCommerce free plugin. It is not displayed on the auction listing page. We do not provide the option for displaying a countdown timer in the auction settings. This functionality is added to the Ultimate WooCommerce Auction Pro plugin. There are many better features available in the Pro plugin like more auction settings, anti-snaping, auto-debit, buyer’s premium fee, etc… You can check all these features on the plugin sale site.
If you want to display a timer on the auction listing page with a free plugin, you need to add a custom code for it. I can give you the following hint.
1) You need to override the content-product.php template of the WooCommerce plugin to your active theme. Please read this document for how to override the WooCommerce plugin template to the theme. You will get an idea of how to do this.
2) You can add the below code for the countdown timer in the content-product.php template.
3) It will display the countdown timer on the shop page, category page, and shortcode page(auction listing page).
Timer Code :
<?php
if(($product->is_woo_ua_closed() === FALSE ) and ($product->is_woo_ua_started() === TRUE )) { ?>
<div class="uwa_auction_time" id="uwa_auction_countdown">
<strong>
<?php _e('Time Left:', 'ultimate-woocommerce-auction'); ?>
</strong>
<div class="uwa-main-auction-product uwa_auction_product_countdown" data-time="<?php echo esc_attr($product->get_woo_ua_remaining_seconds()) ?>" data-auction-id="<?php echo esc_attr( $product_id ); ?>"
data-format="<?php echo esc_attr(get_option( 'woo_ua_auctions_countdown_format' )) ?>">
</div>
</div>
<?php
}
?>
If you are not able to add this custom code, I have attached the content-product.php template with the custom code. You will get an idea of how to add this code.
https://we.tl/t-PDloVcNdjz
Thank You
Plugin Author
Nitesh
(@nitesh_singh)
Thanks @payalrajyaguru for your answer.