Here is my code , but its not working
add_filter( 'wpcf7_validate_text', 'custom_text_validation_filter', 10, 2 );
function custom_text_validation_filter( $result, $tag ) {
$tag = new WPCF7_Shortcode( $tag );
if ('couponcode' == $tag->name) {
$the_value = $_POST[$name];
if($the_value!="abc")
{
$result->invalidate( $tag, "Invalid Coupon Code" );
}
}
return $result;
}
Any Suggestion please ...Help me through it
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire