Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save junenacpil29/4ea75834168921ea99affc28e58e3ef2 to your computer and use it in GitHub Desktop.
Save junenacpil29/4ea75834168921ea99affc28e58e3ef2 to your computer and use it in GitHub Desktop.
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