Jump to content

How to edit custom text in WP


Eternal_hacker

Recommended Posts

add_filter( 'woocommerce_get_availability_text', 'wiseowl_custom_get_availability_text', 99, 2 );
  
function wiseowl_custom_get_availability_text( $availability, $product ) {
  $stock = $product->get_stock_quantity();
  if ( $product->is_in_stock() && $product->managing_stock() ) $availability = __( 'Quantity: ' . $stock, 'woocommerce' );
  return $availability;
}

this is for fucntions.php  or simply remove sock control in metadata in product input page.

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...