This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // only copy if needed | |
/** | |
* Removes the stock / availability HTML from the product variation | |
* since this is added via js the stock HTML filter is ignored | |
* | |
* @param array $data the variation data | |
* @return array updated data | |
*/ | |
function sww_wc_remove_variation_stock_display( $data ) { | |
unset( $data['availability_html'] ); | |
return $data; | |
} | |
add_filter( 'woocommerce_available_variation', 'sww_wc_remove_variation_stock_display', 99 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment