wcv_product_price

Description

apply_filters( 'wcv_product_price', array( $vars ) )

Parameters (1) (array)

Sample

array( 
  'post_id'   => $post_id, 
  'id'      => '_regular_price', 
  'label'     => __( 'Regular Price', 'wcvendors-pro' ) . ' (' . get_woocommerce_currency_symbol() . ')', 
  'data_type'   => 'price', 
  'wrapper_start' => $wrapper_start, 
  'wrapper_end'   => '</div>', 
  'custom_attributes' => array( 
    'data-rules' => 'decimal', 
    'data-error' => __( 'Price should be a number.', 'wcvendors-pro' )
  )
)

 

Usage Examples

To run the filter, copy this sample

$array_val = apply_filters( 'wcv_product_price', array( $attributes ) );
  if ( ! empty( $array_val ) ) {

    // what has been modified...

}

To make a callback function, copy this sample

// the filter wcv_product_price callback
function filter_wcv_product_price( 'wcv_product_price', array( $attributes ) ) {
  // do your thing here :-) ... 

  return $array_val; 
}
add_filter( 'wcv_product_price', 'filter_wcv_product_price', 10, 1 );

To remove the filter, copy this sample

 //remove the filter
remove_filter( 'wcv_product_price', 'filter_wcv_product_price', 10, 1 );

Defined

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

  • wcvendors-pro/public/forms/class-wcvendors-pro-product-form.php line 754
    WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_product_price', array(

filters

Updated on January 9, 2017

Was this article helpful?