Hi guit4eva,
To do that you need to change the source files of Jigoshop, which is not recommended and with no minimum PHP knowledge you could cause fatal errors.
If you are familiar with PHP then you could do the following: go to Jigoshop root folder and locate the following file : jigoshop_product_class.php
If you have the latest version of Jigoshop it should be in directory –
wp-content/plugins/jigoshop/classes
locate the code line 570 and change the __(‘ available’, ‘jigoshop’); to
__(‘ left’, ‘jigoshop’);
Please remember that the changes will be gone ufter you will update Jigoshop.
Hi there,
thanks for your response. Is there no way to do this with a hook or such that will keep through updates? I more just want to get rid of the words “in stock” before the quantity text.
Hi guit4eva,
Yes there is a way of course, put the below code to your theme “functions.php”
file:
add_filter(‘jigoshop_product_availability’, ‘changeCustomAvailability’);
function changeCustomAvailability($notice = array(), $_product = 0){
;
$product = new jigoshop_product($_product);
if($product->is_in_stock()){
$notice = array(
‘availability’ => __(‘In Stock’, ‘jigoshop’),
‘class’ => null
);
$notice[‘availability’] .= ‘: ‘. $product->stock.’ ‘.__(‘ Left’, ‘jigoshop’);
}if(!$product->is_in_stock()){
$notice[‘availability’] = __(‘Out of Stock’, ‘jigoshop’);
}
return $notice;
}
Awesome, thanks so much – I really appreciate it! 🙂
Thats great,
we are glad to help 🙂