Advertisement
pedronave

WooCommerce: How to change Out of Stock text through filters

Jul 12th, 2013
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. /* --------------------------------- */
  2. /* Only works with WooCommerce 2.x.x */
  3. /* --------------------------------- */
  4.  
  5. /*
  6. Place the following code inside your theme's functions.php
  7. */
  8.  
  9.  
  10. add_filter('woocommerce_get_availability','custom_out_of_stock',10);
  11.  
  12. function custom_out_of_stock($availability){
  13.     $new_outta_stock = "Your custom text goes here!";
  14.     $availability['availability']= $new_outta_stock;
  15.     return $availability;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement