Description
apply_filters( 'wcv_product_sale_price', array( $attributes ) )
Parameters (1) (array)
Sample
array( 'post_id' => $post_id, 'id' => '_sale_price', 'data_type' => 'price', 'label' => __( 'Sale Price', 'wcvendors-pro' ) . ' ('.get_woocommerce_currency_symbol().')', 'desc_tip' => 'true', 'description' => '<a href="#" class="sale_schedule right">' . __( 'Schedule', 'wcvendors-pro' ) . '</a>', 'wrapper_start' => '<div class="all-50 small-100">', 'wrapper_end' => '</div></div>', 'custom_attributes' => array( 'data-rules' => 'decimal', 'data-error' => __( 'Sale price should be a number.', 'wcvendors-pro' ) ) )
Usage Examples
To run the filter, copy this sample
$array_val = apply_filters( 'wcv_product_sale_price', array( $attributes ) ) ; if ( ! empty( $array_val ) ) { // what has been modified... }
To make a callback function, copy this sample
// the filter wcv_product_sale_price callback function filter_wcv_product_sale_price( array( $attributes ) ) { // do your thing here :-) ... return $array_val; } add_filter( 'wcv_product_sale_price', 'filter_wcv_product_sale_price', 10, 1 );
To remove the filter, copy this sample
//remove the filter remove_filter( 'wcv_product_sale_price' 'filter_wcv_product_sale_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 782
WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_product_sale_price', array(