Repository Forums Support Expiry dates for WooCommerce PRO Expiry date not displayed as expected Reply To: Expiry date not displayed as expected

#1760
Soft79
Keymaster

You can change this with template override.

1) Create a new file wp-content/YOUR_CHILD_THEME/soft79-wc-expiry-dates/single-product/expiry-date.php
2) Paste this contents in the file:


<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
if ( ! empty( $stock_items ) ):
	?>
	<div class="soft79_wcxd_expiry_dates">
		<?php
            if ( $expiry_date = $product_logic->getPurchasableExpiryDate() ) {
                echo $expiry_rule->getTitle() . ': <span class="soft79_wcxd_expiry_date">' . SOFT79_WCXD_View::formatStockItemsHtml( $stock_items ) . '</span>';
            }
		?>
	</div>
	<?php
endif;

Now all expiry dates are displayed at the product detail page.