add_filter to specific WooCommerce Category

I ‘m trying to show stock availibility for a WooCommerce category ‘workshops’ in this case. The code here works, but works on everything in the store. How can I apply this to just the ‘workshops’ category?

<?php add_filter( 'woocommerce_get_availability', 'wcs_custom_get_availability', 1, 2); function wcs_custom_get_availability( $  availability, $  _product ) {    global $  product;      // Change In Stock Text     if ( $  _product->is_in_stock() ) {         $  availability['availability'] = __('Available!', 'woocommerce');     }      // Change in Stock Text to only 1 or 2 left     if ( $  _product->is_in_stock() && $  product->get_stock_quantity() <= 4 ) {         $  availability['availability'] = sprintf( __('Only %s left!', 'woocommerce'), $  product->get_stock_quantity());     }      // Change Out of Stock Text     if ( ! $  _product->is_in_stock() ) {         $  availability['availability'] = __('Sorry, we sold out!', 'woocommerce');     }      return $  availability; }