Last active
August 24, 2020 09:55
-
-
Save digitalchild/109f9b7b953dfc38b43c96cabe0b70a9 to your computer and use it in GitHub Desktop.
remove stock status from the WC Vendors Pro products status column
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 | |
add_filter('wcv_product_row_status', 'product_row_status', 10, 6 ); | |
function product_row_status( $string, $product_status, $product_type, $date, $stock_status_label, $product ){ | |
$new_string = | |
sprintf( | |
'<span class="status %s">%s</span><br /> | |
<span class="product_type %s">%s</span><br /> | |
<span class="product_date">%s</span><br />', | |
lcfirst( $product_status ), | |
$product_status, | |
sanitize_title_with_dashes( lcfirst( $product_type ) ), | |
$product_type, | |
date_i18n( get_option( 'date_format' ), strtotime( $date ) ) | |
); | |
return $new_string; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment