Skip to content

Instantly share code, notes, and snippets.

@digitalchild
Last active August 24, 2020 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitalchild/109f9b7b953dfc38b43c96cabe0b70a9 to your computer and use it in GitHub Desktop.
Save digitalchild/109f9b7b953dfc38b43c96cabe0b70a9 to your computer and use it in GitHub Desktop.
remove stock status from the WC Vendors Pro products status column
<?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