Advertisement
eappereira

Stock Text WOO

Apr 27th, 2015
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. //No loop do seu tema pode estar assim, ou em functions.php
  2.  
  3.  
  4. add_filter( 'woocommerce_get_availability', 'custom_override_get_availability', 1, 2);
  5. function custom_override_get_availability( $availability, $_product ) {
  6. if ( $_product->is_in_stock() ) $availability['availability'] = __('In Stock', 'woocommerce');
  7. return $availability;
  8. }
  9.  
  10. //Pode se usar isto, porém terá de reescrever para produtos variaveis
  11. $product->get_stock_quantity()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement