how to use a Filter Hook
-
I want to use the following filter hook:
$validate=mwb_sfw_add_to_cart_validation’,false,$product_id,$quantity);
and set it to true instead of false.But i am a bit confused how to set up the add_filter function.
I made a beginning but this is not working.
function custom_filter( $validate ) {
$validate = apply_filters( ‘mwb_sfw_add_to_cart_validation’, true, $product_id, $quantity );
return $validate;
}
add_filter( ‘mwb_sfw_add_to_cart_validation’, ‘custom_filter’);Thanks in advance!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘how to use a Filter Hook’ is closed to new replies.