Thursday, February 11, 2021

PHP removal

 Removing this from PHP customisation


// Hide "in stock" @ Single Products 

function my_wc_hide_in_stock_message( $html, $text, $product ) {

  $availability = $product->get_availability();

  if ( isset( $availability['class'] ) && 'in-stock' === $availability['class'] ) {

  return '';

  }

  return $html;


}


add_filter( 'woocommerce_stock_html', 'my_wc_hide_in_stock_message', 10, 3 );

No comments: