wcv_product_table_rows

Description

apply_filters( 'wcv_product_table_rows' , $new_rows );

Parameters (1) ( array )

Sample

$new_row->ID      = $row->ID; 
$new_row->tn      = get_the_post_thumbnail( $row->ID, array( 120, 120 ) );  
$new_row->details     = apply_filters( 'wcv_product_row_details' , sprintf('<h4>%s</h4> %s %s <br />%s %s <br />' , $product->get_title(), __( 'Categories:', 'wcvendors-pro' ),$product->get_categories(), __('Tags:', 'wcvendors-pro'), $product->get_tags() ) ); 
$new_row->price     = wc_price( $product->get_display_price() ) . $product->get_price_suffix(); 
$new_row->status    = sprintf('%s <br /> %s', WCVendors_Pro_Product_Controller::product_status( $row->post_status ), date_i18n( get_option( 'date_format' ), strtotime( $row->post_date ) ) );
$new_row->row_actions   = $row_actions; 
$new_row->product     = $product; 

$new_rows[] = $new_row;

Usage Examples

To run the filter, copy this sample

$array_val = apply_filters( 'wcv_product_table_rows' , $new_rows );
  if ( ! empty( $array_val ) ) {

    // what has been modified...

}

To make a callback function, copy this sample

// the filter_wcv_product_table_rows callback
function my_filter_function( $param )  {
  // do your thing here :-) ... 

  return $array_val;
}
add_filter( 'wcv_product_table_rows' , 'my_filter_function', 10, 1 );

To remove the filter, copy this sample

 //remove the filter
remove_filter( 'wcv_product_table_rows', 'my_filter_function', 10, 1 );

Defined

This filter is defined in the following source file(s)

  • wcvendors-pro/public/class-wcvendors-pro-product-controller.php line 1668
    return apply_filters( 'wcv_product_table_rows' , $new_rows );

filters

Updated on January 9, 2017

Was this article helpful?