Check if a product is in stock

<?php if ( $product->is_in_stock() ) {
	echo 'Lagerstatus:&nbsp;';
	echo '<img src="';
	echo get_stylesheet_directory_uri();
	echo '/assets/images/pa_lager.png">';
	echo 'På lager';
} else {
	echo 'Lagerstatus:&nbsp;' . 'Bestillingsvare';
}
?>

 

Leave a Reply

Your email address will not be published. Required fields are marked *