jaw@jawtemplates.com

How to Add Woocommerce Product Days Availability

Simply create  a custom field in a product and then show it in a single product page

newcustomfield

 

When you add 0 (zero), the string will not show. Default value is “1-3“. You can change the string (translation) here – ../goodstore/woocommerce/content-single-product.php on line 169

daysavailability

 
View code

 if(get_post_meta( get_the_ID(), 'availability_days', true ) != 0) {
$days=get_post_meta( get_the_ID(), 'availability_days', true );
printf(__("Available in %s days","jawtemplates"),$days);
}
  • Was this Helpful ?
  • yes   no

Leave a Reply

You must be logged in to post a comment.