Tagged: x
-
AuthorPosts
-
January 30, 2017 at 12:40 pm #1351153
huylam1ParticipantHi there,
How do I change the text for the inventory on individual product page? Right now it says ‘# in stock’. I would like to change it to ‘# spots left’.
Thank you.
January 30, 2017 at 2:11 pm #1351306
RahulModeratorHi There,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
January 30, 2017 at 11:27 pm #1351806
huylam1ParticipantJanuary 31, 2017 at 3:17 am #1351979
ChristopherModeratorHi there,
Please add following code in child theme’s functions.php :
add_filter( 'woocommerce_get_availability', 'custom_get_availability', 1, 2); function custom_get_availability( $availability, $_product ) { global $product; $stock = $product->get_total_stock(); if ( $_product->is_in_stock() ) $availability['availability'] = __($stock . ' SPOTS LEFT', 'woocommerce'); return $availability; }Hope it helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1351153 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
